﻿(self.webpackChunkvk=self.webpackChunkvk||[]).push([[40885],{984287:(e,t,i)=>{"use strict";i.d(t,{drawAlbumPartRow:()=>s});i(59357);function s(e){return`<div class="audio_album_part_row">${getLang("audio_album_part").replace("{part}",e)}</div>`}},430463:(e,t,i)=>{"use strict";i.d(t,{getAlbumParts:()=>a});var s=i(820587);function a(e){if(e&&e.getAudiosCount()&&e.isFullyLoadable()&&!e.hasMore()){for(var t=e.getAudiosList(),i=e.getAudiosCount(),a=[],o=0,l=0;l<i;l++){var r=t[l][s.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_PART];r>o&&(o=r,a.push({number:r,offset:l}))}if(a.length>1)return a}return!1}},234247:(e,t,i)=>{"use strict";i.d(t,{showAudioAlbum:()=>o});var s=i(185850),a=i(986773);function o(e,t){return cur.viewAsBox?cur.viewAsBox():(t=AudioUtils.asObject(t),layers.fullhide&&layers.fullhide(),(0,a.onAdditionalEvent)(e,t,{type:s.TYPE_SHOW_ALBUM}),AudioUtils.showAudioPlaylist(t.album[0],t.album[1],t.album[2]))}},463091:(e,t,i)=>{"use strict";i.d(t,{followArtist:()=>l});var s=i(386409),a=i(124041),o=i(486125);function l(e,t,i,l){(0,s.lockButton)(l),ajax.post("al_artist.php",{act:"follow",artist_id:e,ref:t,hash:i},{onFail:()=>(0,s.unlockButton)(l),onDone:i=>{(0,s.unlockButton)(l),a.FlatButton.setLabel(l,getLang("audio_following_artist_button")),l.classList.add("MusicAuthor__follow_btn__followed"),(0,o.showDoneBoxFull)("",{},{text:getLang("audio_follow_artist_success_notification_text"),title:getLang("audio_follow_artist_success_notification_title")}),l.onclick=s=>{s.preventDefault(),AudioUtils.unfollowArtist(e,t,i,l)}}})}},57472:(e,t,i)=>{"use strict";function s(e,t){ajax.post("al_artist.php",{act:"track_to_official",hash:e,url:t},{onFail:()=>!0})}i.d(t,{trackArtistToOfficial:()=>s})},636760:(e,t,i)=>{"use strict";i.d(t,{unfollowArtist:()=>l});var s=i(386409),a=i(315544),o=i(124041);function l(e,t,i,l){(0,s.lockButton)(l),ajax.post("al_artist.php",{act:"unfollow",artist_id:e,ref:t,hash:i},{onFail:()=>(0,s.unlockButton)(l),onDone:i=>{l&&((0,s.unlockButton)(l),(0,a.hasClass)(l,"MusicAuthor__follow_btn__can_follow")?(o.FlatButton.setLabel(l,getLang("audio_follow_artist_button")),l.classList.remove("MusicAuthor__follow_btn__followed"),l.onclick=s=>{s.preventDefault(),AudioUtils.followArtist(e,t,i,l)}):re(l))}})}},442277:(e,t,i)=>{"use strict";function s(e,t,i){var s,a=AudioUtils.getAddRestoreInfo();switch(e){case"current_delete":s=getLang("audio_delete_from_current");break;case"recoms_delete":s=getLang("audio_dont_show");break;case"listened_delete":s=getLang("audio_remove_from_list");break;case"delete":if(AudioUtils.isPodcast(t))s=getLang("audio_podcast_delete_episode");else if(window.AudioPage&&AudioPage.isInRecentPlayed(i))s=getLang("audio_remove_from_list");else{var o=a[t.fullId];s=o&&o.deleteAll?o.deleteAll.text:getLang("global_delete_audio")}break;case"restore_recoms":s=getLang("audio_restore_audio");break;case"more":s=getLang("global_media_selector_more");break;case"add":var l=a[t.fullId];if(l&&a[l.addedFullId]&&(l=null),AudioUtils.isPodcast(t))s=getLang("audio_podcast_restore_episode");else if(l&&"deleted"==l.state)s=getLang("audio_restore_audio");else if(l&&"added"==l.state)s=getLang("global_delete_audio");else{var r=!!window.AudioPage&&currentAudioPage(i);s=r&&r.getOwnerId()<0&&r.canAddToGroup()&&r.getOwnerId()!==t.ownerId?getLang("audio_add_to_group"):getLang("audio_add_to_audio")}break;case"edit":s=AudioUtils.isPodcast(t)?getLang("audio_podcast_edit_episode"):getLang("audio_edit_audio");break;case"next":s=cur.lang&&cur.lang.global_audio_set_next_audio||getLang("audio_set_next_audio");break;case"recoms":s=getLang("audio_show_recommendations");break;case"fave":s=AudioUtils.isPodcast(t)?getLang("audio_podcast_listen_later"):"";break;default:s=""}return s}i.d(t,{getRowActionName:()=>s})},160260:(e,t,i)=>{"use strict";i.d(t,{hasAudioHQBodyClass:()=>a});var s=i(315544);function a(){return(0,s.hasClass)(document.body,AudioUtils.AUDIO_HQ_LABEL_CLS)}},930982:(e,t,i)=>{"use strict";i.d(t,{renderAudioDiag:()=>a});var s=i(315544);function a(){var e=(0,s.ge)("audio_diag_log"),t=ls.get(AudioUtils.LOG_LS_KEY)||[];e&&each(t,(function(t,i){var a=new Date(i.shift()).toUTCString();i=i.join(", "),e.appendChild((0,s.se)('<div class="audio_diag_log_row"><span class="audio_diag_log_time">'+a+"</span>"+i+"</div>"))}))}},655700:(e,t,i)=>{"use strict";i.d(t,{toggleAudioHQBodyClass:()=>a});var s=i(315544);function a(){var e=AudioPlayer.showHQLabel();(0,s.toggleClass)(document.body,AudioUtils.AUDIO_HQ_LABEL_CLS,e)}},869053:(e,t,i)=>{"use strict";i.d(t,{updateQueueReceivedPost:()=>a});var s=i(315544);function a(e){e&&each((0,s.geByClass)("_audio_row",e),(function(){(0,s.domData)(this,"new-post","groups"==cur.module?"wall":"feed")}))}},67766:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AudioPlaylist:()=>AudioPlaylist});var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(66108),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(296253),core_js_modules_es6_array_from__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(530522),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(991181),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(579665),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(95767),core_js_modules_es6_regexp_search__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(976142),core_js_modules_es6_array_sort__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(820075),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(59357),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(751876),_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(40906),_utils__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(45634),_playlist_loadAllPlaylistAudios__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(270148);function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}class AudioPlaylist{static splitId(e){var t=_toArray(e.split("_")),i=t[0],s=t[1],a=t.slice(2);return[i,s,a=a.join("_")]}constructor(e,t,i){var s={};if(e&&(0,_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(e.getId))return e.isReference()?(getAudioPlayer().addPlaylist(this),e):(this._ref=e,void getAudioPlayer().addPlaylist(this));isObject(e)?s=e:(s.ownerId=t,s.type=e,s.albumId=i||++AudioPlaylist.plIndex),this._type=s.type,this._ownerId=s.ownerId||vk.id,this._albumId=s.albumId||0,this._fromId=s.fromId||0,this._list=[],this._context=s.context||"",this._blockId=s.blockId,this._nextOffset=s.nextOffset,this._isFakeId=!1,this._expire=s.expire||null,this._noDiscover=s.hasOwnProperty("noDiscover")?s.noDiscover:null,this.mergeWith(s),getAudioPlayer().addPlaylist(this)}updatePlaylist(e){var t=this.getSelf(),i=!1;return t&&e?(t._title!==e.title&&(t._title=e.title,i=!0),t._titleLang!==e.titleLang&&(t._titleLang=e.titleLang,i=!0),i):i}getIsFakeId(){return this.getSelf()._isFakeId}setIsFakeId(e){this.getSelf()._isFakeId=e}getId(){return this.getType()+"_"+this.getOwnerId()+"_"+this.getAlbumId()}getFullId(){return this.getOwnerId()+"_"+this.getAlbumId()+(this.getAccessHash()?"_"+this.getAccessHash():"")}isReference(){return!!this._ref}getSelf(){return this._ref&&isObject(this._ref)?this._ref:this}getType(){return this.getSelf()._type}getExpire(){return this.getSelf()._expire}getOwnerId(){return+this.getSelf()._ownerId}getAlbumId(){return this.getSelf()._albumId}getPlaylistId(){return this.getSelf()._albumId}getOriginalPlaylistRawId(){return this.getSelf()._originalPlaylistRawId}getFollowHash(){return this.getSelf()._followHash}getContext(){return this.getSelf()._context}setContext(e){this.getSelf()._context=e}getRef(){return this.getSelf()._ref}getRawId(){return this.getSelf()._rawId}getGridCovers(){return this.getSelf()._gridCovers||""}getTitle(){return this.getSelf()._title||""}getTitleLang(){return this.getSelf()._titleLang||""}getSubtitle(){return this.getSelf()._subTitle||""}getDescription(){return this.getSelf()._description||""}getRawDescription(){return this.getSelf()._rawDescription||""}getAccessHash(){return this.getSelf()._accessHash||""}getFromId(){return this.getSelf()._fromId||0}setFromId(e){this.getSelf()._fromId=e}getAuthorLine(){return this.getSelf()._authorLine||""}getAuthorHref(){return this.getSelf()._authorHref||""}getAuthorName(){return this.getSelf()._authorName||""}getInfoLine1(){return this.getSelf()._infoLine1||""}getInfoLine2(){return this.getSelf()._infoLine2||""}getListens(){return this.getSelf()._listens||0}getAddClasses(){return this.getSelf()._addClasses||""}getLastUpdated(){return this.getSelf()._lastUpdated||""}getEditHash(){return this.getSelf()._editHash||""}getDeleteHash(){return this.getSelf()._deleteHash||""}getReplaceHash(){return this.getSelf()._replaceHash||""}getCoverUrl(){return this.getSelf()._coverUrl||""}getBlocks(){return this.getSelf()._blocks||{}}getFeedFrom(){return this.getSelf()._feedFrom}getFeedOffset(){return this.getSelf()._feedOffset}getSearchParams(){return this.getSelf()._searchParams||null}getSearchQid(){return this.getSelf()._searchQid||null}getLocalFoundCount(){return this.getSelf()._localFoundTotal||0}getTotalCount(){return this.getSelf()._totalCount}getTotalCountHash(){return this.getSelf()._totalCountHash}getShuffle(){return this.getSelf()._shuffle}getFriendId(){return this.getSelf()._friend}getNoDiscover(){return this.getSelf()._noDiscover}getNextOffset(){var e=this.getSelf();return e._forceReload?0:""===e._nextOffset?e._nextOffset:e._nextOffset||this.getAudiosCount()}getAudiosList(){return this.getSelf()._list||[]}getUnshuffledAudiosList(){var e=this.getSelf();return e._originalList?e._originalList:e._list}getItemsList(){return this.getSelf()._items||[]}getPostId(){return this.getSelf()._postId}getWallQuery(){return this.getSelf()._wallQuery}getWallType(){return this.getSelf()._wallType}getCommunititesBlock(){return this.getSelf()._communitiesBlock}getArtistsBlock(){return this.getSelf()._artistsBlock}getPlaylistsBlock(){return this.getSelf()._playlistsBlock}getLiveInfo(){var e=this.getSelf()._live;return!!e&&{hostId:(e=e.split(","))[0],audioId:e[1],hash:e[2]}}getAudioAt(e){var t=this.getSelf();return Array.isArray(t._list)&&t._list.length>e?t._list[e]:null}getAudiosCount(){var e=this.getSelf();return Array.isArray(e._list)?e._list.length:0}getTotalDuration(){var e=this.getAudiosList(),t=0;return each(e,(function(e,i){t+=i[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_DURATION]})),t}getItemsCount(){var e=this.getSelf();return e._items=e._items||[],e._items.length}getForceReload(){return this.getSelf()._forceReload}setForceReload(e){this.getSelf()._forceReload=e}setLocalFoundCount(e){this.getSelf()._localFoundTotal=e}setAdsAllowed(e){return this.getSelf()._isAdsAllowed=e}setFollowed(e){var t=this.getAddClasses()||"";return t=t.replace("audio_playlist__followed",""),e&&(t+=" audio_playlist__followed"),this.getSelf()._addClasses=t,this.getSelf()._isFollowed=e}isBlocked(){return!!this.getSelf()._isBlocked}hasMore(){return!!this.getSelf()._hasMore}isOfficial(){return!!this.getSelf()._isOfficial}isFollowed(){return this.getSelf()._isFollowed}isShuffled(){return!!this.getShuffle()}isAdsAllowed(){return!!this.getSelf()._isAdsAllowed}isInitedSortedList(){return!!this.getSelf()._sorted}isFullyLoadable(){return this.getType()===AudioPlaylist.TYPE_PLAYLIST}isLive(){return!!this.getLiveInfo()}_unref(){var e=this._ref;if(isObject(e)){var t={};for(var i in e)if(e.hasOwnProperty(i)&&!(0,_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(e[i])&&0===i.indexOf("_")){var s=e[i];t[i.substr(1)]=isObject(s)?clone(s):s}t.hasMore=!1,delete this._ref,this._type=AudioPlaylist.TYPE_TEMP,this._albumId=t.albumId,this._list=[],this.mergeWith(t)}}equals(e){return this.getSelf()===e.getSelf()}serialize(){return JSON.stringify(this.asObject())}asObject(){var e={},t=getAudioPlayer().getCurrentAudio(),i=Math.max(0,this.indexOfAudio(t));return e.list=clone(this.getAudiosList().slice(Math.max(0,i-100),i+300),!0),each(e.list,(function(e,t){t[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_URL]=""})),e.type=this.getType()||AudioPlaylist.TYPE_TEMP,e.ownerId=this.getOwnerId(),e.albumId=this.getAlbumId(),e.accessHash=this.getAccessHash(),e.hasMore=this.hasMore(),e.nextOffset=this.getNextOffset(),e.title=this.getTitle(),e.titleLang=this.getTitleLang(),e.context=getAudioPlayer()._getPlayingContext(),e.originalPlaylistRawId=this.getOriginalPlaylistRawId(),e.expire=this.getExpire?this.getExpire():null,this.getType()===AudioPlaylist.TYPE_PLAYLIST&&this.getAlbumId()>0&&(e.originalPlaylistRawId=this.getOwnerId()+"_"+this.getAlbumId()+"_"+this.getAccessHash()),e}asPlaylistData(){return{type:this.getType(),ownerId:this.getOwnerId(),id:this.getId(),title:this.getTitle(),hasMore:this.hasMore(),list:this.getAudiosList(),nextOffset:this.getNextOffset(),subtitle:this.getSubtitle(),totalCount:this.getTotalCount(),blockId:this.getBlockId()}}toString(){return this.getId()}_moveCurrentAudioAtFirstPosition(){var e=getAudioPlayer().getCurrentAudio(),t=this.getSelf(),i=this.indexOfAudio(e);-1!==i&&(t._list.splice(i,1),t._list.unshift(e),t._movedAudioToFirstPos=i)}_resetMovedAudioToInitialPosition(){var e=this.getSelf();if(e._movedAudioToFirstPos){var t=e._list.splice(0,1);e._list.splice(e._movedAudioToFirstPos,0,t[0]),delete e._movedAudioToFirstPos}}_ensureIndex(e){var t=this.getSelf();if(t._index)e&&e();else{var i=function(e,t){var i=intval(t);return i>=33&&i<48?String.fromCharCode(i):e};t._index=new vkIndexer(t._list,(function(e){return(e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_PERFORMER]+" "+e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_TITLE]).replace(/\&\#(\d+);?/gi,i)}),e)}}clean(e){e||this._unref();var t=this.getSelf();t._hasMore=!0,t._list=[],t._items=[],t._feedOffset=t._feedFrom=0,t._nextOffset=0}cleanIndex(){this.getSelf()._index=null}initSortedList(e){if(!Array.isArray(e))return!1;var t=this.getSelf();t._originalList||(t._originalList=[].concat(t._list)),t._sorted=!0,t._list=e}removeSortedList(){var e=this.getSelf();e._originalList&&(e._list=[].concat(e._originalList)),e._sorted=!1,e._shuffle=!1}shuffle(e,t){if(!(this.isShuffled()&&e||!this.isShuffled()&&!e)){var i=this.getSelf(),s=!1;if(delete i._sorted,e){var a;if(!this.hasMore()||this.getBlockId())i._originalList=i._originalList||[].concat(i._list),shuffle(i._list),t||this._moveCurrentAudioAtFirstPosition(),a=!0;else if(this.getType()===AudioPlaylist.TYPE_SEARCH)i._originalList=i._originalList||[].concat(i._list),shuffle(i._list),t||this._moveCurrentAudioAtFirstPosition(),a=!0;else if(inArray(this.getType(),[AudioPlaylist.TYPE_RECOM])){var o=getAudioPlayer().getCurrentAudio(),l=this.indexOfAudio(o);this.clean(!0),l>=0&&i.addAudio(o,0),a=!0,s=!0}else this._unref(),(i=this.getSelf())._originalList=i._originalList||[].concat(i._list),shuffle(i._list),t||this._moveCurrentAudioAtFirstPosition(),a=!0;a&&(i._shuffle=e)}else i._originalList?i._list=i._originalList:this.clean(!0),s=!0,delete i._shuffle,delete i._originalList;return s&&this.load(this.getNextOffset()),!0}}getNextAudio(e,t){if(!e)return!!(e=this.getAudioAt(0))&&(t&&_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.asObject(e).isClaimed?this.getNextAudio(e,!0):e);var i=this.indexOfAudio(e);if(i<0)return!1;if(i+1<this.getAudiosCount()){var s=this.getAudioAt(i+1);return t&&_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.asObject(s).isClaimed?this.getNextAudio(s,!0):s}return!1}removeAudio(e){var t=this.indexOfAudio(e);if(t>=0){this._unref();var i=this._list.splice(t,1);return this._index&&this._index.remove(i[0]),t}return-1}addAudio(e,t){this._unref();var i=void 0===t,s=e=>{var s=this.getUnshuffledAudiosList(),a=this.indexOfAudio(e);if(a>=0){if(i)return;s.splice(a,1)}(e=clone(e))[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_TITLE]=clean(replaceEntities(e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_TITLE]).replace(/(<em>|<\/em>)/g,"")),e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_PERFORMER]=clean(replaceEntities(e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_PERFORMER]).replace(/(<em>|<\/em>)/g,"")),i?s.push(e):s.splice(t,0,e),this._index&&this._index.add(e)};if(isArray(e)&&isArray(e[0]))for(var a=0,o=e.length;a<o;a++)s(e[a]);else e&&e.length&&s(e)}moveAudio(e,t){this._unref();var i=this._list.splice(e,1);e<t&&(t-=1),this._list.splice(t,0,i[0])}indexOfAudio(e){if(!e)return-1;var t;isString(e)?t=e.split("_"):isObject(e)?t=[e.ownerId,e.id]:isArray(e)&&(t=[e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID],e[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_ID]]);var i=this.getSelf()._list;if(!i)return-1;for(var s=0,a=i.length;s<a;s++)if(i[s]&&t[0]==i[s][_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]&&t[1]==i[s][_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_ID])return s;return-1}getAudio(e){if(!e)return null;var t=this.getSelf();e=e.split("_");for(var i=0,s=t._list.length;i<s;i++)if(e[0]==t._list[i][_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]&&e[1]==t._list[i][_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_ID])return t._list[i];return null}getBlockId(){return this.getSelf()._blockId}loadAll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.isFullyLoadable())return e&&e();this.load(0,e,!0,"default",t)}loadByBlockId(e,t,i){var s=this,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=s._onDoneLoading;delete s._onDoneLoading,delete s._loadingAll,each(i||[],((e,i)=>{i&&i(s,t)}))},o=this.getNextOffset();return!this.getAudiosCount()||e&&e===o?(this._onDoneLoading=this._onDoneLoading||[],this._onDoneLoading.push(t),this._loadingAll?void 0:i?(this._loadingAll=!0,void(0,_playlist_loadAllPlaylistAudios__WEBPACK_IMPORTED_MODULE_12__.loadAllPlaylistAudios)(this,a)):void ajax.post("al_audio.php?act=load_block_playlist",{block_id:this._blockId,start_from:o},{onDone:e=>{this._blockId=e.blockId;var t=getAudioPlayer();t.mergePlaylistData(this,e),a(this),t.saveStateCurrentPlaylist(),""===this.getNextOffset()&&(clearTimeout(this._sendSearchStatsTimeout),this._sendSearchStatsTimeout=setTimeout(this.sendSearchStats.bind(this,"search_view"),3e3),this._searchPlayStatsSent=!1)}})):t&&t(this)}load(offset,_onDone,needAll){var trackType=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"default",viewType=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;(0,_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(offset)?(_onDone=offset,offset=0):offset=intval(offset),this.isExpired()&&(this.getSelf()._hasMore=!0,this.setForceReload(!0));var searchParams=this.getSearchParams(),wasPreload=!1,countAvailable=this.getType()===AudioPlaylist.TYPE_FEED?this.getItemsCount():this.getAudiosCount(),isGoingToLoadAll=this.isFullyLoadable()&&needAll&&this.hasMore(),callOnDones=(e,t,i)=>{var s=this._onDoneLoading;i||(delete this._onDoneLoading,delete this._loadingAll),(!wasPreload||wasPreload&&cur.audioChooseBox&&curBox())&&each(s||[],((e,i)=>{this.cleanIndex(),i&&i(this,t)})),i&&(wasPreload=!0)};if(!this.getForceReload()&&(offset<countAvailable&&!isGoingToLoadAll||""===this.getNextOffset()||!this.hasMore()||searchParams&&this.getType()===AudioPlaylist.TYPE_SEARCH&&!searchParams.globalQuery))return _onDone&&_onDone(this);if(this._onDoneLoading=this._onDoneLoading||[],this._onDoneLoading.push(_onDone),!this._loadingAll){if(needAll)return this._loadingAll=!0,void(0,_playlist_loadAllPlaylistAudios__WEBPACK_IMPORTED_MODULE_12__.loadAllPlaylistAudios)(this,callOnDones,viewType);var params;offset=this.getNextOffset(),offset===this.getLocalFoundCount()&&(offset-=this.getLocalFoundCount()),offset||clearTimeout(this._sendSearchStatsTimeout),this.getForceReload()&&this.setForceReload(!1);var isCatalog=!1;if(this._blockId)params={act:"load_block_playlist",block_id:this._blockId,start_from:this.getNextOffset()},isCatalog=!0;else{var ownerId=cur.audioPage&&this.getType()===AudioPlaylist.TYPE_SEARCH?cur.audioPage.getOwnerId():this.getOwnerId();params={act:"load_section",type:this.getType(),owner_id:ownerId,playlist_id:this.getPlaylistId(),offset,context:this.getContext(),access_hash:this.getAccessHash(),search_q:searchParams?searchParams.globalQuery:null,search_performer:searchParams?searchParams.performer:null,search_lyrics:searchParams?searchParams.lyrics:null,search_sort:searchParams?searchParams.sort:null,search_history:searchParams?intval(searchParams.fromHistory):null,search_qid:this.getSearchQid(),feed_from:this.getFeedFrom(),feed_offset:this.getFeedOffset(),shuffle:this.getShuffle(),post_id:this.getPostId(),wall_query:this.getWallQuery(),wall_type:this.getWallType(),claim:intval(nav.objLoc.claim),track_type:trackType}}ajax.post("al_audio.php",params,{onDone:(loadedPlaylist,tpl,langs,templatesScript,data)=>{if(!loadedPlaylist)return this.getSelf()._nextOffset="",void(isCatalog?_onDone&&_onDone(loadedPlaylist):callOnDones());if(addTemplates({audio_playlist_snippet:tpl}),extend(cur.lang,langs),templatesScript&&eval(templatesScript),!this._loadingAll||needAll){var audioPlayer=getAudioPlayer();audioPlayer.mergePlaylistData(this,loadedPlaylist),isCatalog?_onDone&&_onDone(loadedPlaylist.list):callOnDones(),audioPlayer.saveStateCurrentPlaylist(),offset&&""!==loadedPlaylist.nextOffset||(clearTimeout(this._sendSearchStatsTimeout),this._sendSearchStatsTimeout=setTimeout(this.sendSearchStats.bind(this,"search_view"),3e3),this._searchPlayStatsSent=!1)}},onFail:()=>!0,cache:this.getType()===AudioPlaylist.TYPE_SEARCH?1:0})}}isExpired(){var e=this.getExpire();return!!e&&new Date(1e3*e).getTime()<(new Date).getTime()}mergeInfo(e){this._albumId=e.id||this._albumId;each(["accessHash","addClasses","artistsBlock","authorLine","authorHref","authorName","communitiesBlock","coverUrl","description","gridCovers","editHash","feedFrom","feedOffset","followHash","hasMore","infoLine1","infoLine2","isAdsAllowed","isFollowed","isOfficial","isBlocked","lastUpdated","listens","live","nextOffset","originalList","ownerId","playlistsBlock","postId","rawId","rawDescription","searchQid","searchParams","shuffle","subTitle","title","titleLang","noDiscover","totalCount","totalCountHash","type","wallQuery","wallType","expire"],((t,i)=>{void 0!==e[i]&&(this["_"+i]=e[i])}))}mergeWith(e){var t=e.list;if(this.isExpired()&&(this.getSelf()._list=[]),t&&this.addAudio(e.list),e.items){this._items=this._items||[];for(var i=0,s=e.items.length;i<s;i++)this._items.push(e.items[i])}this.mergeInfo(e)}search(e,t){var i=this.getSelf();isObject(e)||(e={q:e}),this._ensureIndex((()=>{var s=i._index?i._index.search(e.q):[];return s=s.filter((function(t){return!e.lyrics||""!==t[_utils__WEBPACK_IMPORTED_MODULE_11__.AudioUtils.AUDIO_ITEM_INDEX_LYRICS]})),t(s)}))}sendSearchStats(e){if("search_play"===e){if(this._searchPlayStatsSent)return;this._searchPlayStatsSent=!0}ajax.post("al_audio.php?act=search_stats",{event_type:e,search_type:this.getSearchQid()?"external":"internal",search_params:JSON.stringify(this.getSearchParams()),results_count:this.getTotalCount()})}fetchNextLiveAudio(e){var t=this.getLiveInfo();ajax.post("al_audio.php",{act:"a_get_audio_status",host_id:t.hostId,hash:t.hash},{onDone:t=>{if(t){var i=this.indexOfAudio(t);i>=0?this.moveAudio(i,this.getAudiosCount()-1):this.addAudio(t)}e&&e(t)},onFail:()=>!0})}}AudioPlaylist.plIndex=0,AudioPlaylist.TYPE_CURRENT="current",AudioPlaylist.TYPE_PLAYLIST="playlist",AudioPlaylist.TYPE_MY="my",AudioPlaylist.TYPE_ALBUM="album",AudioPlaylist.TYPE_TEMP="temp",AudioPlaylist.TYPE_RECOM="recoms",AudioPlaylist.TYPE_SEARCH="search",AudioPlaylist.TYPE_FEED="feed",AudioPlaylist.TYPE_LIVE="live",AudioPlaylist.TYPE_WALL="wall",AudioPlaylist.TYPE_RECENT="recent",AudioPlaylist.DEFAULT_PLAYLIST_ID=-1},461292:(e,t,i)=>{"use strict";i.d(t,{TopAudioPlayer:()=>n});var s=i(45634),a=i(315544),o=i(200134),l=i(563175),r=i(996512),d="top_audio_player_enabled";class n{constructor(e){this.ap=getAudioPlayer(),this._el=e,this._playIconBtn=(0,a.ge)("top_audio"),this._audioBtnGroup=(0,a.ge)("top_audio_btn_group"),this.init()}static init(){var e=(0,a.ge)("top_audio_player"),t=(0,a.data)(e,"object");t||(t=new n(e),(0,a.data)(e,"object",t))}init(){var e=this;function t(t){return(0,a.hasClass)(this,"top_audio_player_play")?(e.ap.podcastSetActionRef(e.ap.getCurrentAudio(),e.ap.isPlaying()?s.AudioUtils.PodcastsLogs.ACTION_PAUSE:s.AudioUtils.PodcastsLogs.ACTION_PLAY,"top_player"),e.ap.isPlaying()?e.ap.pause():e.ap.play(),!1):(0,a.hasClass)(this,"top_audio_player_prev")?(e.ap.playPrev(),!1):(0,a.hasClass)(this,"top_audio_player_next")?(e.ap.playNext(),!1):void 0}this.ap.on(this,o.events.UPDATE,this.onUpdate.bind(this)),this.ap.on(this,o.events.PLAY,this.onPlay.bind(this)),this.ap.on(this,o.events.PLAY_REQUESTED,this.onPlay.bind(this)),this.ap.on(this,[o.events.PAUSE,o.events.STOP],this.onPause.bind(this)),this.ap.top=this,each(["prev","play","next"],(function(i,s){addEvent((0,a.geByClass1)("top_audio_player_"+s,e._el),"click",t)})),addEvent(this._el,"mousedown",(function(t){if(!(0,a.gpeByClass)("top_audio_player_btn",t.target,e._el))return 1!=t.which||(0,a.hasClass)(t.target,"top_audio_player_btn")||(0,a.hasClass)(t.target,"top_audio_player_act_icon")||s.AudioUtils.getLayer().toggle(),cancelEvent(t)})),addEvent((0,a.ge)("top_audio"),"mousedown",(function(e){return!0!==checkEvent(e)&&(s.AudioUtils.getLayer().toggle(),cancelEvent(e))})),browser.safari||addEvent(document,"keydown keyup",(function(e){(0,a.toggleClass)((0,a.ge)("top_audio_play"),"shuffle",e.shiftKey)})),this._resetAudio(),this._updateTitle(this.ap.getCurrentAudio())}onPause(){(0,a.removeClass)(this._el,"top_audio_player_playing"),this._el.querySelector(".top_audio_player_play svg").outerHTML=(0,r.getIcon24Play)().icon;var e=(0,a.geByClass1)("_top_audio_player_play_blind_label");e&&(e.innerHTML=getLang("global_audio_play"))}onPlay(e,t,i){this._hideButton(),requestAnimationFrame((function(){var e=s.AudioUtils.getLayer();e&&e.isShown()&&e.updatePosition()})),(0,a.addClass)(this._el,d),(0,a.toggleClass)(this._el,"top_audio_player_playing",!0),this._el.querySelector(".top_audio_player_play svg").outerHTML=(0,l.getIcon24Pause)().icon;var o=(0,a.geByClass1)("_top_audio_player_play_blind_label");o&&(o.innerHTML=this.ap.isPlaying()?getLang("global_audio_pause"):getLang("global_audio_play")),this._updateTitle(e,i)}onUpdate(e){e?(this._updateTitle(e),this._hideButton(),(0,a.addClass)(this._el,d)):this._resetAudio()}_updateTitle(e,t){if(t=intval(t),e=s.AudioUtils.asObject(e),(0,a.toggleClass)(this._el,"audio_player_podcast",s.AudioUtils.isPodcast(e)),(0,a.toggleClass)(this._el,"audio_player_article_tts",s.AudioUtils.isArticleTts(e)),e){void 0!==this._currTitleReTO&&clearTimeout(this._currTitleReTO);var i=(0,a.geByClass1)("top_audio_player_title_out",this._el);(0,a.re)(i);var o=(0,a.geByClass1)("top_audio_player_title",this._el);if(0!==t){var l=t<0?-10:10,r=`opacity: 0; top: ${l}px; left: ${o.offsetLeft}px`,d=this.getTitleText(e),u=(0,a.se)('<div class="top_audio_player_title top_audio_player_title_next" style="'+r+'">'+d+"</div>");u.setAttribute("onmouseover","setTitle(this)"),t>0?domInsertAfter(u,o):domInsertBefore(u,o),(0,a.addClass)(o,"top_audio_player_title_out"),(0,a.setStyle)(o,{top:-l,opacity:0}),setTimeout((function(){(0,a.setStyle)(u,{top:0,opacity:1})}),10),clearTimeout(this._currTitleReTO),this._currTitleReTO=setTimeout((function(){(0,a.re)(o),(0,a.removeClass)(u,"top_audio_player_title_next")}),n.TITLE_CHANGE_ANIM_SPEED)}else o&&(o.innerHTML=this.getTitleText(e),o.titleSet=0,o.setAttribute("onmouseover","setTitle(this)"))}}getTitleText(e){return e.performer+" &mdash; "+e.title}_resetAudio(){(0,a.removeClass)(this._playIconBtn,d),(0,a.removeClass)(this._el,d),(0,a.removeClass)(this._el,"top_audio_player_playing"),(0,a.removeClass)(this._el,"audio_player_podcast"),(0,a.removeClass)(this._el,"audio_player_article_tts"),(0,a.show)(this._audioBtnGroup);var e=s.AudioUtils.getLayer();e&&e.isShown()&&e.updatePosition()}_hideButton(){(0,a.hide)(this._audioBtnGroup),(0,a.hasClass)(this._playIconBtn,d)||(0,a.addClass)(this._playIconBtn,d)}}n.TITLE_CHANGE_ANIM_SPEED=190},189158:(e,t,i)=>{"use strict";i.d(t,{WebPlayerAdapter:()=>r});var s=i(343860),a=i(45634),o=i(315544),l=i(120290);class r extends s.AudioStatsPlayerAdapter{getPausedBy(e){var t=this.player,i=t.pausedByVideo,s=t.pausedByStories,a=t.pausedByAudio,o=t.pausedByQueue;return i&&e<i||window.Videoview&&Videoview.isLayerShown()?"video":s&&e<s||window.cur&&cur.storyLayer?"stories":a&&e<a?"audio":o&&e<o?"queue":null}getState(){var e=super.getState(),t=this.getAudioId();if(t){var i=(0,o.geByClass)("_audio_row_"+t+" audio_row__current",(0,o.ge)("page_layout"));if(i&&i.length)return s.FULL_SCREEN_STATE}return e}getAudio(){return(0,l.asObject)(this.player.getCurrentAudio())}getProgress(){return this.player.getCurrentProgress()}getProgressInSeconds(){var e=this.player.getCurrentAudio();return e?Math.round(this.player.getCurrentProgress()*e[a.AudioUtils.AUDIO_ITEM_INDEX_DURATION]):0}getVolume(){return Math.round(100*(e=this.player.getVolume(),Math.log(1+34*e)/Math.log(35)));var e}getAudioId(){var e=this.player.getCurrentAudio();if(e)return e[a.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[a.AudioUtils.AUDIO_ITEM_INDEX_ID]}getAudioTrackCode(){var e=this.player.getCurrentAudio();if(e)return e[a.AudioUtils.AUDIO_ITEM_INDEX_TRACK_CODE]}getPrevAudioId(){var e=this.player._prevAudio;if(e)return e[a.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[a.AudioUtils.AUDIO_ITEM_INDEX_ID]}getPrevPlaylistId(){var e=this.player._prevPlaylist;return e&&!e.getIsFakeId()?e.getFullId():null}getPlaylistId(){var e=this.player.getCurrentPlaylist();return e&&!e.getIsFakeId()?e.getFullId():null}getContext(){return this.player._getPlayingContext()}getSequence(){return this.player._seq}getType(){if(this.player._impl)return this.player._impl.type}getSearchParams(){var e=this.player.getCurrentPlaylist();if(e)return e.getSearchParams()}isShuffledPlaylist(){var e=this.player.getCurrentPlaylist();if(e)return e.isShuffled()}isRealPlaylist(){var e=this.player.getCurrentPlaylist();return!!e&&e.getType()===AudioPlaylist.TYPE_PLAYLIST}isRealPrevPlaylist(){var e=this.player._prevPlaylist;return!!e&&e.getType()===AudioPlaylist.TYPE_PLAYLIST}isPodcast(){var e=this.player.getCurrentAudio();return a.AudioUtils.isPodcast(e)}isArticleTts(){var e=this.player.getCurrentAudio();return a.AudioUtils.isArticleTts(e)}isLastTrack(){var e=this.player.getCurrentAudio(),t=this.player.getCurrentPlaylist();return!!e&&(!(!e||t)||t.indexOfAudio(e)+1===t.getAudiosCount())}hasPlaylist(){return Boolean(this.player.getCurrentPlaylist())}hasSearchParams(){return this.getContext()===AudioPlaylist.TYPE_SEARCH}isDebug(){return Boolean(ls.get(AudioPlayer.LS_PREFIX+"stats_debug"))}sendListenedData(e){var t=this.player.getListenedHash();!t&&window.cur&&cur.audioPage&&(t=cur.audioPage._data.listenedHash);var i=extend({act:"listened_data",impl:this.getType(),hash:t,v:5,loc:nav.strLoc},e);ajax.post("al_audio.php",i,{onDone:e=>{this.player.setAdsConfig&&this.player.setAdsConfig(e)},onFail:()=>!0})}}},840887:(e,t,i)=>{"use strict";i.d(t,{followCurator:()=>r});var s=i(386409),a=i(124041),o=i(850167),l=i(200134);function r(e,t,i){(0,s.lockButton)(i),ajax.post("al_curator.php",{act:"follow",curator_id:e,hash:t},{onFail:()=>(0,s.unlockButton)(i),onDone:t=>{(0,o.getAudioPlayer)().notify(l.events.CURATOR_FOLLOW),(0,s.unlockButton)(i),a.FlatButton.setLabel(i,getLang("audio_following_artist_button")),i.classList.add("MusicAuthor__follow_btn__followed"),i.onclick=s=>{s.preventDefault(),AudioUtils.unfollowCurator(e,t,i)}}})}},190347:(e,t,i)=>{"use strict";i.d(t,{unfollowCurator:()=>r});var s=i(386409),a=i(124041),o=i(850167),l=i(200134);function r(e,t,i){(0,s.lockButton)(i),ajax.post("al_curator.php",{act:"unfollow",curator_id:e,hash:t},{onFail:()=>(0,s.unlockButton)(i),onDone:t=>{(0,o.getAudioPlayer)().notify(l.events.CURATOR_UNFOLLOW),(0,s.unlockButton)(i),a.FlatButton.setLabel(i,getLang("audio_follow_artist_button")),i.classList.remove("MusicAuthor__follow_btn__followed"),i.onclick=s=>{s.preventDefault(),AudioUtils.followCurator(e,t,i)}}})}},470353:(e,t,i)=>{"use strict";i.d(t,{addToGroupBox:()=>a});var s=i(315544);function a(e,t,i){var a=e+"_"+t,o=window.showBox("al_audio.php",{act:"add_to_groups_box",playlist_id:a,access_hash:i}).setButtons(getLang("Save"),(()=>{var e=[];for(var t in cur.wdd.follow_playlist_wwd.selected)e.push(cur.wdd.follow_playlist_wwd.selected[t][0]);e.length&&((0,s.ge)("add_playlist_to_group_fail").innerHTML="",ajax.post("al_audio.php",{act:"add_to_group",group_ids:e,hash:(0,s.ge)("add_playlist_to_group_hash").value,playlist_id:a},{onDone(e){o.hide(),showDoneBox(e)},onFail:e=>((0,s.ge)("add_playlist_to_group_fail").innerHTML=e,!0)}))}))}},748409:(e,t,i)=>{"use strict";i.d(t,{removeFromGroup:()=>a});var s=i(315544);function a(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=e+"_"+t,l=cur.audioPage&&-cur.audioPage._ownerId||cur.group_id;if(l>0)var r=window.showBox("al_audio.php",{act:"delete_from_group_box",playlist_id:o,group_id:l}).setButtons(getLang("global_yes"),(()=>{ajax.post("al_audio.php",{act:"delete_from_group",group_id:l,hash:i,playlist_id:o},{onDone(e){if(r.hide(),showDoneBox(e),a){var t=(0,s.gpeByClass)("audio_pl_snippet2",a);t&&t.classList.remove("audio_pl__can_remove_from_club")}},onFail:e=>(r.hide(),showDoneBox(e),!0)})}),getLang("global_cancel"),(()=>r.hide())).show()}},459285:(e,t,i)=>{"use strict";i.d(t,{addToPlaylistsBoxInit:()=>n});i(991181),i(296253);var s=i(315544),a=i(386409),o=i(786067),l=i(609720),r=i(806439),d=i(219202);function n(e,t,i,u,_){if("undefined"==typeof AutoList)return stManager.add(jsc("web/auto_list.js"),(()=>{n(e,t,i,u,_)}));var c=curBox(),h=(0,s.geByClass1)("_audio_atp_content",c.bodyNode),p=(0,s.geByClass1)("_audio_atp_list",c.bodyNode),g=(0,s.ge)("audio_atp_search"),A=(0,s.geByClass1)("_audio_atp_empty"),y=(0,s.getSize)(h)[1];(0,s.setStyle)(p,{height:y-(0,s.getSize)(g)[1]});var f,v="";function P(){f&&f.destroy(),p.innerHTML="";var e=[];e=v?u.filter((e=>e[2].toLowerCase().indexOf(v)>=0)):u,(0,s.toggle)(p,0!=e.length),(0,s.toggle)(A,0==e.length),f=new AutoList(p,{onNeedRows:(t,i)=>{for(var s=[],a=i,o=Math.min(e.length,i+30),l=a;l<o;l++){var n=e[l];if(n){var u=n[4]?"ape_selected":"",_=`<div class="ape_check">\n              <div class="ape_check--unchecked">${(0,r.getIcon24CheckCircleOff)().icon}</div>\n              <div class="ape_check--checked">${(0,d.getIcon24CheckCircleOn)().icon}</div>\n            </div>`,c=`<div class="ape_pl_item _ape_pl_item ${u}" data-id="${n[1]}">${_}<div class="ape_pl_item_inner"><span class="ape_pl_title">${n[2]}</span> <span class="ape_pl_size">${n[3]}</span></div></div>`;s.push(c)}}t(s)}})}P(),cur.addToPlaylistSearch=(0,l.debounce)((function(e){v=trim(e).toLowerCase(),P()}),200);var m={},E={};addEvent(p,"click",(e=>{var t=(0,s.domClosest)("_ape_pl_item",e.target),i=(0,s.domData)(t,"id");(0,s.toggleClass)(t,"ape_selected")?(E[i]=!0,delete m[i]):(m[i]=!0,delete E[i])})),c.removeButtons(),c.addButton((0,o.getLang)("global_save"),(s=>{var o=Object.keys(E),l=Object.keys(m);ajax.post("al_audio.php",{act:"save_audio_in_playlists",add_pl_ids:o.join(","),remove_pl_ids:l.join(","),owner_id:e,audio_owner_id:t,audio_id:i,hash:_},{showProgress:a.lockButton.pbind(s),hideProgress:a.unlockButton.pbind(s),onDone:()=>{c.hide()},onFail:()=>(c.hide(),!0)})}),"ok",!0),c.addButton((0,o.getLang)("global_cancel"),c.hide.bind(this),"no",!0)}},953054:(e,t,i)=>{"use strict";function s(e,t,i){var s=nav.objLoc.claim;if(s){var a={act:i?"a_unclaim_playlist":"a_claim_playlist",claim:s,type:"audio",owner_id:e,playlist_id:t};ajax.post("al_claims.php",a,{onDone:e=>{showDoneBox(e)}})}}i.d(t,{claimPlaylist:()=>s})},734264:(e,t,i)=>{"use strict";i.d(t,{copyPlaylistLink:()=>o});var s=i(601984),a=i(812595);function o(e,t,i){statlogsValueEvent("audio_copy_link",vk.id),(0,s.copyToClipboard)((0,a.getPlaylistUrl)(e,t,i,!0)),showDoneBox(getLang("audio_playlist_link_copied"))}},548616:(e,t,i)=>{"use strict";function s(e,t,i,s){stManager.add([jsc("web/audio.js"),"audio.css",jsc("web/auto_list.js")],(function(){ajax.post("al_audio.php?act=playlists_edit_data",{owner_id:e,playlist_id:t},{onDone:function(a){a.audio_playlist_cover_upload_options&&(cur.audioCoverUploadOptions=cur.audioCoverUploadOptions||{},cur.audioCoverUploadOptions[e]=a.audio_playlist_cover_upload_options),a.editorial_playlists_params&&(cur.editorialPlaylistsParams=a.editorial_playlists_params),AudioPage.editPlaylist(e,t,i,s)},onFail:()=>!0})}))}i.d(t,{editPlaylist:()=>s})},703780:(e,t,i)=>{"use strict";i.d(t,{followPlaylist:()=>r});i(59357);var s=i(315544),a=i(654612),o=i(200134),l=[];function r(e,t,i,r){var d=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(vk&&vk.widget&&!vk.id&&window.Widgets)return Widgets.oauth(),!1;var u=getAudioPlayer().getPlaylist(AudioPlaylist.TYPE_PLAYLIST,t,i);function _(a){var o=(0,s.domData)(e,"text-followed"),l=(0,s.domData)(e,"text-follow"),r=a?o:l;(0,s.domData)(e,"tooltip-text",r),(geByClass1("audio_pl_snippet__action_btn_add_text",e)||e).innerHTML=r,u.setFollowed(a);var d=u.getAddClasses()||"";d=d.replace("audio_pl__followed",""),a&&(d+=" audio_pl__followed"),u.mergeWith({addClasses:d}),each((0,s.geByClass)(`_audio_pl_${t}_${i}`),((t,i)=>{(0,s.toggleClass)(i,"audio_pl__followed",a);var o=i.querySelectorAll(".audio_pl_snippet__action_btn_add")[0];o&&(o.innerHTML=e.innerHTML)}))}function c(e){if(cur.audioPage&&cur.audioPage._data.playlists&&cur.audioPage.getOwnerId()===vk.id){if(e){var s=null;l=l.filter((e=>{var a=e.playlistId===i&&e.playlistOwnerId===t;return a&&(s=e.pl),!a})),s&&cur.audioPage._data.playlists.unshift(s)}else cur.audioPage._data.playlists=cur.audioPage._data.playlists.filter((e=>{var s=e.id===i&&e.owner_id===t;return s&&l.push({playlistId:i,playlistOwnerId:t,pl:e}),!s}));cur.audioPage.updatePlaylistsCounter(vk.id)}}var h=(0,s.gpeByClass)("_audio_pl",e),p=(0,s.toggleClass)(h,"audio_pl__followed");_(p),c(p),ajax.post("al_audio.php",{act:"follow_playlist",playlist_owner_id:t,playlist_id:i,hash:r,showcase:d,block_id:n},{onDone(e){isObject(e)&&p&&getAudioPlayer().notify(o.events.MUSIC_PLAYLISTS_ADD,e)},onFail:e=>(new a.MessageBox({title:getLang("global_error")}).content(e).setButtons(getLang("audio_ok"),(function(){curBox().hide()})).show(),_(!1),c(!1),!0)})}},295224:(e,t,i)=>{"use strict";i.d(t,{getContextPlaylist:()=>l});i(530522),i(66108),i(296253),i(991181),i(579665),i(95767),i(59357),i(751876);var s=i(315544);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],s=!0,a=!1,o=void 0;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(i.push(l.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function l(e,t){var i=getAudioPlayer(),o=AudioUtils.getAudioFromEl(e,!0);if(o){var l=null,r=[],d=(0,s.domData)(e,"new-post"),n=!1,u=null,_=AudioPlaylist.TYPE_TEMP,c=vk.id,h=null,p={},g=window.AudioPage&&currentAudioPage(e);if((window.traverseParent||function(e,t){for(e=(0,s.ge)(e);e&&!t(e)&&(e=(0,s.domPN)(e))!=document;);return null})(e,(e=>n=(0,s.domData)(e,"audio-context"))),n=(n=o.context||n)||("audio"==cur.module?cur.submodule:cur.module),t)return{context:n};var A=a(AudioUtils.contextSplit(n),2),y=A[0],f=A[1],v=(0,s.gpeByClass)("_audio_pl",e),P=!1;if(v){var m=(0,s.domData)(v,"playlist-id");(u=i.getPlaylistByBlockId(m))||(u=i.getPlaylist(...AudioPlaylist.splitId(m||"")));var E=(0,s.domData)(v,"title")||"";E&&u.mergeWith({title:clean(E)});var I=(0,s.domData)(v,"access-hash")||"";I&&u.mergeWith({accessHash:I});var w=g&&g.getPageCurrentPlaylist(),C=i.getCurrentPlaylist();w&&w.equals(u)&&C&&i.getCurrentPlaylist().getFullId()===w.getFullId()&&g.getSortedList()?u.initSortedList(g.getSortedList()):o.isFromCurrentPlaylist||(g&&g.clearSortedList(),u.removeSortedList(),u.shuffle(0))}else if(g&&g.getPageCurrentPlaylist())u=g.getPageCurrentPlaylist();else if("module"==y){var b=f;u=i.getPlaylist(AudioPlaylist.TYPE_PLAYLIST,b||cur.oid||vk.id,AudioPlaylist.DEFAULT_PLAYLIST_ID),r=[l]}else if(0===o.context.indexOf("admin"))(u=i.getPlaylist(AudioPlaylist.TYPE_PLAYLIST,o.ownerId,0,o.accessKey)).getAudiosCount()||u.setForceReload(!0);else if(0===o.context.indexOf("im"))l=(l=(0,s.gpeByClass)("_im_peer_history",e))||(0,s.gpeByClass)("_fc_tab_log_msgs",e),h="im"+(cur.peer||"");else if(0===o.context.indexOf("board"))P=!0,h=o.context,r=R((0,s.geByClass)("_wall_audio_rows",l));else if(0===o.context.indexOf("widget"))P=!0,h=o.context;else if(0===o.context.indexOf("wiki"))P=!0,h="wiki";else if(0===o.context.indexOf("post")){_=AudioPlaylist.TYPE_WALL,h=o.context,P=!0;var L=o.context.replace("post","").split("_");c=L[0],p={postId:L[1]}}else if(0===o.context.indexOf("choose"))h=o.context;else if("feed"==d||0===o.context.indexOf("feed")||0===o.context.indexOf("feedsearch"))h="feed",P=!0,r=R((0,s.geByClass)("wall_text",l));else if("group_wall"==y||"user_wall"==y||0===o.context.indexOf("reply")||"wall"==d){_=AudioPlaylist.TYPE_WALL,c=cur.oid;var U=(f||"").split("_")[1],T=cur.wallQuery||"",O=(0,s.ge)("wall_search"),S=inArray(cur.wallType,["own","full_own"])?"own":"all";h=hashCode(S+"_"+T),P=!0,"wall"==cur.module&&(0,s.val)(O)&&(T=(0,s.val)(O)),U&&(p={postId:U,wallQuery:T,wallType:S}),0===o.context.indexOf("reply")&&(r=R([(0,s.gpeByClass)("_replies_list",e)]),h="reply"+h,P=!0);var D=(0,s.gpeByClass)("wide_column",e);if(D){var x=(0,s.geByClass)("wall_text",D);r=Array.isArray(x)&&x.length>0?r.concat(x):r.concat(R([l]))}else r=r.concat(R([l]))}else"article"==y&&(u=cur.articlePlaylist);return l||(l=(0,s.domPN)(e)),(r=r.filter((function(e){return!!e})))&&0!=r.length||(r=[l]),"function"==typeof(u=u||i.getPlaylist(_,c,h)).setIsFakeId&&u.setIsFakeId(P),(u=u.getAudiosCount()?u:AudioUtils.initDomPlaylist(u,r)).mergeWith(p||{}),-1==u.indexOfAudio(o)&&(u=AudioUtils.initDomPlaylist(u,[(0,s.domPN)(e)])),{playlist:u,context:n}}function R(e){return[].slice.call(e)}}},920817:(e,t,i)=>{"use strict";i.d(t,{hidePlaylistFromRecoms:()=>a});var s=i(213294);function a(e,t,i){ajax.post("al_audio.php?act=hide_playlist_from_recoms",{owner_id:e,playlist_id:t,access_hash:i},{onDone(){showDoneBox(getLang("audio_playlist_recoms_was_hidden"));var s=document.getElementsByClassName("ui_actions_menu_item playlist_recoms_hide_or_show")[0];s.innerHTML=getLang("audio_playlist_recoms_show"),s.setAttribute("onclick","AudioUtils.showPlaylistInRecoms("+e+", "+t+", '"+i+"');");for(var a=0,o=["audio_search","audio_search_layer"];a<o.length;a++){var l=o[a],r=document.getElementById(l);if(r)window.currentAudioPage(r).catalogController.currentSection.reloadBlock("recommended_playlists")}},onFail(e){(0,s.showErrorBox)(e||getLang("global_unknown_error"))}})}},517097:(e,t,i)=>{"use strict";i.d(t,{initDomPlaylist:()=>a});var s=i(315544);function a(e,t){var i=[];return each(t,(function(e,t){t&&each((0,s.geByClass)("_audio_row",t),(function(e){i.push(AudioUtils.getAudioFromEl(this))}))})),e.addAudio(i),e}},271891:(e,t,i)=>{"use strict";function s(e,t,i){var s,a=AudioUtils.asObject(e);s=cur.audioPage&&cur.audioPage.getOwnerId()<0&&cur.audioPage.canEditGroup()?cur.audioPage.getOwnerId():vk.id,AudioUtils.playlistsByAudioDataCache=AudioUtils.playlistsByAudioDataCache||{};var o=AudioUtils.playlistsByAudioDataCache,l=s+"_"+a.ownerId+"_"+a.id;o[l]?AudioUtils._showPlaylistsChooser(i,t,o[l],s,a,e):ajax.post("al_audio.php",{act:"playlists_by_audio",owner_id:s,audio_owner_id:a.ownerId,audio_id:a.id},{onDone:(r,d,n)=>{var u=o[l]={playlists:r,morePlaylists:d,newPlaylistHash:n};AudioUtils._showPlaylistsChooser(i,t,u,s,a,e)},onFail:()=>!0})}i.d(t,{initRowPlaylistsChooser:()=>s})},270148:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{loadAllPlaylistAudios:()=>loadAllPlaylistAudios});var AUDIO_LOAD_CHUNK_SIZE=1e3,chunks,isDeleted,isAttach,onDone,playlist,preloadedCount,totalCount=void 0;function loadAllPlaylistAudios(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.getForceReload())e.list=[];else if(!e.hasMore()||!e.isFullyLoadable())return onDone&&onDone();e.setForceReload(!1),chunks=[],isAttach="attach"===i,onDone=t,playlist=e,preloadedCount=0,totalCount=e.getTotalCount(),loadChunk(0,(()=>{isDeleted?onAllLoaded():(isAttach&&onAllLoaded(),loadAllChunks(onAllLoaded,1))}))}function onAllLoaded(){if(isDeleted)return onDone&&onDone(null,isDeleted);var e=[];(each(chunks,(function(t,i){i&&(e=e.concat(i))})),getAudioPlayer().getPlaylists().forEach((t=>{t.getId()===playlist.getId()&&(t._list=e)})),getAudioPlayer().mergePlaylistData(playlist,{hasMore:!1}),onDone)&&onDone(playlist,!1,isAttach&&totalCount>preloadedCount)}function loadAllChunks(e,t){t=t||0;var i=Math.max(0,Math.ceil((totalCount-preloadedCount)/AUDIO_LOAD_CHUNK_SIZE));isAttach&&t&&totalCount>preloadedCount&&i===t&&i++,i-t<=0?e():function(){for(var s=new CallHub(e,i-t),a=t;a<i;a++)loadChunk(a,(()=>{s.done()}))}()}function loadChunk(chunkIndex,callback){var isPreload=isAttach&&!chunkIndex?1:0,offset=chunkIndex*AUDIO_LOAD_CHUNK_SIZE;preloadedCount&&(offset=Math.abs(AUDIO_LOAD_CHUNK_SIZE-preloadedCount-chunkIndex*AUDIO_LOAD_CHUNK_SIZE)),ajax.post("al_audio.php?act=load_section",{type:playlist.getType(),owner_id:playlist.getOwnerId(),playlist_id:playlist.getPlaylistId(),access_hash:playlist.getAccessHash(),from_id:playlist.getFromId(),offset,is_loading_all:1,is_preload:isPreload,context:playlist.getContext(),claim:intval(nav.objLoc.claim),ref:playlist.getRef()},{onDone:function onDone(data,tpl,langs,templatesScript){if(0===chunkIndex){if(addTemplates({audio_playlist_snippet:tpl}),extend(cur.lang,langs),templatesScript&&eval(templatesScript),!data)return isDeleted=!0,callback();isDeleted=!1,totalCount=data.totalCount,preloadedCount=data.list.length,getAudioPlayer().mergePlaylistData(playlist,data)}chunks[chunkIndex]=data.list,callback()},onFail:()=>!0})}},759448:(e,t,i)=>{"use strict";i.d(t,{onAudioAddedToPlaylist:()=>a});var s=i(315544);function a(e,t,i,a){getAudioPlayer().getPlaylist(AudioPlaylist.TYPE_PLAYLIST,e,t).addAudio(a,0),each((0,s.geByClass)(`_audio_pl_${e}_${t}`),((e,t)=>{domReplaceEl(t,(0,s.se)(i))}))}},409082:(e,t,i)=>{"use strict";function s(e,t){var i=t.getAccessHash();cur.chooseMedia("audio_playlist",t.getOwnerId()+"_"+t.getPlaylistId()+(i?":"+i:""),{id:t.getPlaylistId(),ownerId:t.getOwnerId(),coverUrl:t.getCoverUrl(),gridCovers:t.getGridCovers(),title:t.getTitle(),authorName:t.getAuthorName(),authorHref:t.getAuthorHref(),accessHash:t.getAccessHash()})}i.d(t,{onPlaylistChoose:()=>s})},563767:(e,t,i)=>{"use strict";i.d(t,{showAudioPlaylist:()=>r});i(751876);var s=i(315544),a=i(654612),o=i(897213),l=i(812595);function r(e,t,i,r,d,n){if(cur.apLayer)return cancelEvent(d);if(vk.widget)return!0;if(!d||!(d.metaKey&&browser.mac||d.ctrlKey)){var u=null;return window.Photoview&&window.cur&&cur.pvShown&&(u=clone(nav.objLoc),Photoview.hide(!0)),boxRefreshCoords(boxLoader),(0,s.show)(boxLoader),(0,s.show)(boxLayerWrap),stManager.add([jsc("web/auto_list.js"),"audio.css"],(function(){var d,_,c=getAudioPlayer().getPlaylist(AudioPlaylist.TYPE_PLAYLIST,e,t,i);function h(e){boxQueue.hideAll(),cur.apLayerAutoList&&(cur.apLayerAutoList.destroy(),cur.apLayerAutoList=null),layers.wraphide(window.audioPlaylistLayerWrap),layers.fullhide=!1,d&&removeEvent(window.audioPlaylistLayerWrap,"click",d),_&&removeEvent(bodyNode,"keydown",_),delete cur.apLayer,delete cur.apLayerPlaylistId,(0,s.removeClass)(layerBG,"ap_layer_bg_dark"),u?nav.change(u):nav.change({z:!1}),layerQueue.pop()}c.setContext(r),c.setForceReload(!0),c.setFromId(cur.oid),c.loadAll((function(c,p){if((0,s.hide)(boxLoader),(0,s.hide)(boxLayerWrap),p){var g=getLang("audio_error_deleted_playlist_box").split("/");return new a.MessageBox({title:g[0]}).content(g[1]).setButtons(getLang("global_close"),(function(){curBox().hide(),u&&nav.change(u)})).show(),void nav.setLoc(extend(nav.objLoc,{z:!1}))}var A=extend(nav.objLoc,{z:"audio_playlist"+e+"_"+t+(i?"/"+i:"")});nav.setLoc(A),window.audioPlaylistLayerWrap||(window.audioPlaylistLayerWrap=(0,s.se)('<div class="ap_layer_wrap"></div>'),bodyNode.appendChild(window.audioPlaylistLayerWrap));window.audioPlaylistLayerWrap.innerHTML="";var y=c.getAudiosList().length,f=c.isBlocked&&c.isBlocked(),v=(0,l.getPlaylistUrl)(c.getOwnerId(),c.getPlaylistId(),c.getAccessHash()),P=getTemplate("audio_playlist_snippet",{title:c.getTitle(),subTitle:c.getSubtitle(),description:c.getDescription(),coverStyle:c.getCoverUrl()?"background-image:url('"+c.getCoverUrl()+"'); background-size: cover;":"",authorLine:c.getAuthorLine(),infoLine1:c.getInfoLine1(),infoLine2:c.getInfoLine2(),id:c.getPlaylistId(),ownerId:c.getOwnerId(),href:v,addCls:c.getAddClasses(),followHash:c.getFollowHash(),accessHash:c.getAccessHash(),editHash:c.getEditHash(),deleteHash:c.getDeleteHash(),replaceHash:c.getReplaceHash(),gridCovers:c.getGridCovers(),type:c.getType(),context:r,followButtonText:c.isFollowed()?getLang("audio_playlist_btn_added"):getLang("audio_playlist_btn_add")});if(cur.apLayer=(0,s.se)(`\n        <div class="ap_layer">\n          <div class="ap_layer__content">\n            ${P}\n          </div>\n          <div class="ap_layer__close _ap_layer__close"></div>\n        </div>\n      `),f){(0,s.geByClass1)("audio_pl_snippet__body",cur.apLayer).innerHTML=getTemplate("playlist_snippet_stub")}window.audioPlaylistLayerWrap.appendChild(cur.apLayer),addEvent(window.audioPlaylistLayerWrap,"click",d=function(e){e.target!=window.audioPlaylistLayerWrap&&e.target!=(0,s.geByClass1)("_ap_layer__close",cur.apLayer)||layers.fullhide()}),addEvent(bodyNode,"keydown",_=function(e){if(27==e.keyCode)return layers.fullhide(),cancelEvent(e)}),layerQueue.push(),layerQueue.hide(),boxQueue.hideAll(),layers.wrapshow(window.audioPlaylistLayerWrap,.7),(0,s.addClass)(layerBG,"ap_layer_bg_dark");var m=(0,s.geByClass1)("_audio_pl_snippet__list",cur.apLayer),E=AudioUtils.getAlbumParts(c),I=0;y&&!f&&(cur.apLayerAutoList=new o.default(m,{scrollNode:window.audioPlaylistLayerWrap,onNeedRows:function(e,t){for(var i=[],s=c.getUnshuffledAudiosList(),a=t-=I;a<t+30;a++){var o=s[a];if(!o)break;if(E&&E.length&&E[0].offset===a){var l=E.shift();I++,i.push(AudioUtils.drawAlbumPartRow(l.number))}i.push(AudioUtils.drawAudio(o))}e(i)}}));boxRefreshCoords(cur.apLayer),getAudioPlayer().updateCurrentPlaying(),layers.fullhide=h,cur.apLayerPlaylistId=[e,t],n&&n()}))})),!1}}},254492:(e,t,i)=>{"use strict";i.d(t,{showPlaylistInRecoms:()=>a});var s=i(213294);function a(e,t,i){ajax.post("al_audio.php?act=show_playlist_in_recoms",{owner_id:e,playlist_id:t,access_hash:i},{onDone(){showDoneBox(getLang("audio_playlist_recoms_was_showed"));var s=document.getElementsByClassName("ui_actions_menu_item playlist_recoms_hide_or_show")[0];s.innerHTML=getLang("audio_playlist_recoms_hide"),s.setAttribute("onclick","AudioUtils.hidePlaylistFromRecoms("+e+", "+t+", '"+i+"');");for(var a=0,o=["audio_search","audio_search_layer"];a<o.length;a++){var l=o[a],r=document.getElementById(l);if(r)window.currentAudioPage(r).catalogController.currentSection.reloadBlock("recommended_playlists")}},onFail(e){(0,s.showErrorBox)(e||getLang("global_unknown_error"))}})}},403753:(e,t,i)=>{"use strict";i.d(t,{showPlaylistsChooser:()=>l});i(751876);var s=i(315544),a=i(185850),o=i(986773);function l(e,t,i,l,r,d){var n=i.playlists,u=i.newPlaylistHash,_=i.morePlaylists;AudioUtils.copiedToPlaylistAudios=AudioUtils.copiedToPlaylistAudios||{},AudioUtils.copiedToPlaylistAudiosHashes=AudioUtils.copiedToPlaylistAudiosHashes||{};var c=t,h=(0,s.se)((0,s.rs)(AudioUtils.AUDIO_ROW_ACTION_ROW_ITEM,["pl_new",0,getLang("audio_add_to_new_pl"),"audio_row__action_playlist"]));if(domInsertAfter(h,c),c=h,h.addEventListener("click",(()=>{AudioUtils.editPlaylist(l,!1,"edit",{addAudio:d,newPlaylistHash:u})})),each(n,((e,t)=>{var i=!0,l=t[0]+"_"+t[1]+"_"+r.fullId,d=AudioUtils.copiedToPlaylistAudios[l],n="audio_row__action_playlist";(t[3]||d)&&(i=!1,n+=" audio_row__more_playlist_added");var u=(0,s.se)((0,s.rs)(AudioUtils.AUDIO_ROW_ACTION_ROW_ITEM,["pl_"+t[0]+"_"+t[1],0,t[2],n]));domInsertAfter(u,c),c=u;var _=!1;u.addEventListener("click",(()=>{if(!_){_=!0;var e=r.ownerId,d=r.id,n=AudioUtils.copiedToPlaylistAudios[l];n&&(e=(n=n.split("_"))[0],d=n[1]),i&&(AudioUtils.copiedToPlaylistAudiosHashes[l]=t[4]),ajax.post("al_audio.php",{act:"add_audio_to_playlist",hash:t[4],playlist_id:t[1],playlist_owner_id:t[0],audio_owner_id:e,audio_id:d,do_add:intval(i)},{onDone:(e,s,d)=>{(0,o.onAdditionalEvent)(u,r,{type:i?a.TYPE_ADDED:a.TYPE_REMOVED,playlistId:t[0]+"_"+t[1]}),AudioUtils.copiedToPlaylistAudios[l]=!!i&&d,t[4]=i?e:AudioUtils.copiedToPlaylistAudiosHashes[l],i=!i,_=!1},onFail:()=>!0}),(0,s.toggleClass)(u,"audio_row__more_playlist_added",i)}}))})),_){var p=(0,s.se)((0,s.rs)(AudioUtils.AUDIO_ROW_ACTION_ROW_ITEM,["pl_more",0,getLang("audio_row_show_all_playlists"),"audio_row__action_playlist"]));p.addEventListener("click",(()=>{showBox("al_audio.php?act=more_playlists_add",{owner_id:l,audio_owner_id:r.ownerId,audio_id:r.id},{params:{bodyStyle:"padding: 0px",width:560}})})),domInsertAfter(p,c),c=p}e.updatePosition()}},355145:(e,t,i)=>{"use strict";function s(e,t){var i={act:"turn_playlist_discover",owner_id:e,playlist_id:t};ajax.post("al_audio.php",i,{onDone:e=>{showDoneBox(e)}})}i.d(t,{turnPlaylistDiscover:()=>s})},888614:(e,t,i)=>{"use strict";function s(e,t){AudioUtils.isPodcast(t)&&stManager.add([jsc("web/podcast.js")],(function(){Podcast.deleteEpisode(t.fullId,t.deleteHash)}))}i.d(t,{deleteEpisode:()=>s})},798783:(e,t,i)=>{"use strict";function s(e,t){AudioUtils.isPodcast(t)&&(cur.podcastEditData={audioId:t.fullId},stManager.add([jsc("web/podcast.js")],(function(){Podcast.edit(t.fullId)})))}i.d(t,{editEpisode:()=>s})},747447:(e,t,i)=>{"use strict";i.d(t,{faveEpisode:()=>a});var s=i(315544);function a(e,t){if(AudioUtils.isPodcast(t)){var i=AudioUtils.getAudioExtra(t).faveHash;bookmarkPodcast((0,s.geByClass1)("audio_row__action_fave",e),t.fullId,i)}}},557761:(e,t,i)=>{"use strict";function s(e){return!(!AudioUtils.isPodcast(e)||!AudioUtils.getAudioExtra(e).private)}i.d(t,{isPrivatePodcast:()=>s})},425209:(e,t,i)=>{"use strict";function s(e,t){t=AudioUtils.asObject(t),AudioUtils.isPodcast(t)&&showPodcast(e,t.fullId,null,"audio")}i.d(t,{openEpisode:()=>s})},568062:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ACTION_PLAY:()=>s,ACTION_PAUSE:()=>a,ACTION_SEEK:()=>o,ACTION_HEARTBEAT:()=>l,ACTION_TIME_MARKER:()=>r,log:()=>d});var s="play",a="pause",o="seek",l="heartbeat",r="time_marker";function d(e,t){var i=t.audio;AudioUtils.isPodcast(i)&&stManager.add([jsc("web/podcast.js")],(function(){Podcast.log(e,t)}))}},750288:(e,t,i)=>{"use strict";function s(e,t){AudioUtils.isPodcast(t)&&stManager.add([jsc("web/podcast.js")],(function(){Podcast.restoreEpisode(t.fullId,t.editHash)}))}i.d(t,{restoreEpisode:()=>s})},739724:(e,t,i)=>{"use strict";function s(e,t){cur.audioPage&&cur.audioPage.showRecoms(!1,t.fullId)}i.d(t,{showRecoms:()=>s})},867696:(e,t,i)=>{"use strict";i.d(t,{audioSearchPerformer:()=>s});i(59357);function s(e,t,i){var s=!!window.AudioPage&&currentAudioPage(e),a=window.AudioPage&&currentAudioPage(e)||cur.audioPage;layers.fullhide&&layers.fullhide(!0),setTimeout((function(){s&&a?(t=unclean(t).replace(/<em>|<\/em>/g,""),nav.change({q:t,performer:1},i,{searchPerformer:!0,nav:!0,isLayer:s.isLayer()})):nav.go(e,i)}),50)}},986773:(e,t,i)=>{"use strict";i.d(t,{onAdditionalEvent:()=>d});i(175115);var s=i(185850),a=i(189158),o=i(850167),l=i(713359);function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r.apply(this,arguments)}function d(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=new s.AudioStats(new a.WebPlayerAdapter((0,o.getAudioPlayer)())),n=t&&t.context||e&&(0,l.getContext)(e)||"",u=t&&t.album&&t.album.slice(0,2).join("_"),_=r({},t,{context:n,playlistId:u},i);d.sendCurrentAudioEvent({type:_.type,subtype:_.subtype||d.getPlaySubtype(),ownerId:_.ownerId,audioId:_.id,trackCode:_.trackCode,state:d.playerAdapter.getState(),ref:window.cur&&vk.widget?String(cur.widgetReferrer||"").substring(0,20):"",context:_.context,playlistId:_.playlistId})}},207879:(e,t,i)=>{"use strict";i.d(t,{addAudio:()=>g});var s=i(315544),a=i(695724),o=i(200134),l=i(185850),r=i(986773),d=i(295224),n=i(40906),u=i(99392),_=i(786067),c=i(293680),h=i(49535),p=i(654612);function g(e,t,i){if(cur.viewAsBox)return cur.viewAsBox();if(vk&&vk.widget&&!vk.id&&window.Widgets)return Widgets.oauth(),!1;function g(t){return(0,s.domData)(e,"in-progress",(0,a.intval)(t))}if(!(0,a.intval)((0,s.domData)(e,"in-progress"))&&(g(!0),t=t||AudioUtils.getAudioFromEl(e,!0))){var A=window.AudioPage&&currentAudioPage(e),y=A&&A.getOwnerId()<0&&A.canAddToGroup()&&A.getOwnerId()!==t.ownerId?-A.getOwnerId():0,f=AudioUtils.getAddRestoreInfo(),v=f[t.fullId];v&&f[v.addedFullId]&&(v=null);var P=(0,s.geByClass1)("_audio_row_"+t.fullId);P=P!=e&&P;var m=A&&A.getPageCurrentPlaylist(),E=(0,d.getContextPlaylist)(e,!0),I={group_id:y,audio_owner_id:t.ownerId,audio_id:t.id,hash:t.addHash,from:E&&E.context||"",track_code:t.trackCode};v?"recom_hidden"==v.state?(A&&(A.restoreRecommendation(e),g(!1)),AudioUtils.onRowOver(e,!1,!0)):"deleted"==v.state?(c.ajax.post("al_audio.php",{act:"restore_audio",oid:t.ownerId,aid:t.id,hash:t.restoreHash,track_code:t.trackCode},{onDone:function(){(0,r.onAdditionalEvent)(e,t,{type:l.TYPE_ADDED}),g(!1)},onFail:()=>(g(!1),!0)}),(0,s.removeClass)(e,"audio_row__deleted"),delete f[t.fullId],AudioUtils.onRowOver(e,!1,!0)):"added"==v.state&&(c.ajax.post("al_audio.php",{act:"delete_audio",oid:v.audio.ownerId,aid:v.audio.id,hash:v.audio.deleteHash,track_code:t.trackCode},{onDone:function(){(0,r.onAdditionalEvent)(e,t,{type:l.TYPE_REMOVED});var i=window.getAudioPlayer&&window.getAudioPlayer();i&&i.getPlaylist(AudioPlaylist.TYPE_PLAYLIST,y?-y:vk.id,AudioPlaylist.DEFAULT_PLAYLIST_ID).removeAudio(v.addedFullId),g(!1),getAudioPlayer().notify(o.events.MUSIC_AUDIOS_DELETE,t)},onFail:()=>(g(!1),!0)}),(0,s.removeClass)(e,"audio_row__added"),P&&(0,s.removeClass)(P,"audio_row__added"),delete f[t.fullId],getAudioPlayer().notify(o.events.REMOVED,t.fullId,v.addedFullId)):(c.ajax.post("al_audio.php?act=add",I,{onDone:function(a,d){if((0,r.onAdditionalEvent)(e,t,{type:l.TYPE_ADDED}),a){var _=a[AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+a[AudioUtils.AUDIO_ITEM_INDEX_ID];f[t.fullId]={state:"added",addedFullId:_,audio:AudioUtils.asObject(a)},getAudioPlayer().notify(o.events.MUSIC_AUDIOS_ADD,t),(0,n.isFunction)(i)&&i(),function(e,t){var i;if(!t||!t.id)return;var a=null==e||null===(i=e.parentElement)||void 0===i?void 0:i.querySelector(".audio_page_player_share");if(!a)return;var o=(0,s.se)(`\n    <div class="ta_l">\n      <div>${t.text}</div>\n    </div>\n `),l=()=>{window.ajax.post("al_index.php",{act:"help_hints_hide",hash:t.hash,hint_id:t.id})};(0,h.addEvent)(o,"click",l);var r=new u.default(a,{appendToParent:!0,cls:"feature_intro_tt feature_intro_blue_tt feature_intro_blue_tt--heightSmall",content:o,offset:[0,10],align:u.default.ALIGN_RIGHT,onHide:l});r.show(),a.addEventListener("mouseenter",(()=>{r.hide()}))}(e,d)}g(!1)},onFail:function(t){return t&&new p.MessageBox({title:(0,_.getLang)("global_error")}).content(t).setButtons((0,_.getLang)("global_close"),(()=>curBox().hide())).show(),(0,s.removeClass)(e,"audio_row__added"),g(!1),!0}}),(0,s.addClass)(e,"audio_row__added"),P&&(0,s.addClass)(P,"audio_row__added"),getAudioPlayer().notify(o.events.ADDED,t.fullId),A&&m&&A.onUserAction(t,m))}}},874229:(e,t,i)=>{"use strict";function s(e,t){return window.onAudioPageLoaded=function(){return this.uploadAudio({})},nav.go("audios"+e),cancelEvent(t)}i.d(t,{addAudioToOwner:()=>s})},141593:(e,t,i)=>{"use strict";i.d(t,{cancelReplacement:()=>a});var s=i(315544);function a(e,t,i){ajax.post("al_audio.php",{act:"cancel_replacement",hash:t,audio_id:e},{onFail:()=>!0}),(0,s.re)(i)}},59943:(e,t,i)=>{"use strict";i.d(t,{chooseAudioBox:()=>o});var s=i(315544),a=i(49535);function o(e,t,i){if(void 0!==e.selected)cur.lastAddMedia.unchooseMedia(e.selected),e.selected=void 0,(0,s.removeClass)((0,s.domPN)(e),"audio_selected"),e.innerHTML=t.labels.add;else{var o=cur.attachCount&&cur.attachCount()||0;cur.chooseMedia("audio",t.owner_id+"_"+t.id,t.info),(!cur.attachCount||cur.attachCount()>o)&&cur.lastAddMedia&&(e.selected=cur.lastAddMedia.chosenMedias.length-1,(0,s.addClass)((0,s.domPN)(e),"audio_selected"),e.innerHTML=t.labels.cancel)}return(0,a.cancelEvent)(i)}},438022:(e,t,i)=>{"use strict";i.d(t,{claim:()=>a});var s=i(315544);function a(e,t,i){(0,s.addClass)(t,"audio_moder_claimed"),AudioUtils.onRowOver(t,!1,!0),e=AudioUtils.asObject(e),ajax.post("al_claims.php",{act:"a_claim",claim:i,type:"audio",id:e.id,owner_id:e.ownerId})}},569272:(e,t,i)=>{"use strict";i.d(t,{deleteAudio:()=>h});var s=i(315544),a=i(695724),o=i(386409),l=i(654612),r=i(786067),d=i(185850),n=i(986773),u=i(45634),_=i(295224),c=i(200134);function h(e,t,i,h,p){function g(t){return(0,s.domData)(e,"in-progress",(0,a.intval)(t))}if(window.tooltips&&tooltips.hideAll(),!(0,a.intval)((0,s.domData)(e,"in-progress"))){g(!0);var A=!1;t.isClaimed&&(A=!0);var y=u.AudioUtils.getAddRestoreInfo(),f=y[t.fullId];if(f&&f.deleteAll)(0,l.showFastBox)({title:(0,r.getLang)("audio_delete_all_title"),dark:1,onHide:()=>g(!1)},f.deleteConfirmMsg||"",(0,r.getLang)("global_delete"),(function(e){var t=extend({act:"delete_all"},f.deleteAll);ajax.post("al_audio.php",t,{showProgress:o.lockButton.pbind(e),onDone:function(){var e=getAudioPlayer().getPlaylist(AudioPlaylist.TYPE_PLAYLIST,f.deleteAll.from_id,AudioPlaylist.DEFAULT_PLAYLIST_ID);getAudioPlayer().deletePlaylist(e),nav.reload()},onFail:()=>!0})}),(0,r.getLang)("global_cancel"));else{if(A?(0,s.re)(e):(0,s.addClass)(e,"audio_row__deleted"),p){ajax.post("al_audio.php",{act:"remove_listened",audio_id:t.id,audio_owner_id:t.ownerId,hash:t.actionHash},{onFail:()=>!0}),(0,s.re)(e);var v=getAudioPlayer().getCurrentPlaylist();v&&v.getType()==AudioPlaylist.TYPE_RECOM&&v.getAlbumId()==u.AudioUtils.AUDIO_RECOMS_TYPE_LISTENED&&v.removeAudio(t.fullId)}else if(h){var P=u.AudioUtils.getAudioExtra(t).recom,m=null,E=(0,_.getContextPlaylist)(e);E&&(m=E.playlist&&E.playlist.getAlbumId());var I={act:"hide_recommendation",hash:P.hash,audio_id:t.fullId,playlist_id:m};nav.objLoc.audio_id&&(I.recommendation_type="query"),ajax.post("al_audio.php",I,{onDone:()=>{(0,n.onAdditionalEvent)(e,t,{type:d.TYPE_RECOMMENDATION_REMOVED}),g(!1)},onFail:()=>(g(!1),!0)}),y[t.fullId]={state:"recom_hidden"};var w=getAudioPlayer().getCurrentPlaylist();w&&w.getType()==AudioPlaylist.TYPE_RECOM&&(y[t.fullId].removedCurrentPos=w.removeAudio(t))}else ajax.post("al_audio.php",{act:"delete_audio",oid:t.ownerId,aid:t.id,hash:t.deleteHash,restore:1,track_code:t.trackCode},{onDone:(i,s)=>{(0,n.onAdditionalEvent)(e,t,{type:d.TYPE_REMOVED}),A||g(!1),y[t.fullId]={state:"deleted",deleteAll:i,deleteConfirmMsg:s},A&&u.AudioUtils.deleteDeletedAudios(),getAudioPlayer().notify(c.events.MUSIC_AUDIOS_DELETE,t),u.AudioUtils.onRowOver(e,!1,!0)},onFail:()=>!0});u.AudioUtils.onRowOver(e,!1,!0)}}}},875751:(e,t,i)=>{"use strict";i.d(t,{deleteCurrentAudio:()=>a});var s=i(315544);function a(e,t){window.tooltips&&"function"==typeof window.tooltips.hideAll&&window.tooltips.hideAll(e);var i=getAudioPlayer().getCurrentPlaylist();i&&i.removeAudio(t.fullId),(0,s.re)(e)}},600732:(e,t,i)=>{"use strict";function s(){each(AudioUtils._audioAddRestoreInfo||{},((e,t)=>{"deleted"!=t.state&&"recom_hidden"!=t.state||getAudioPlayer().deleteAudioFromAllPlaylists(e)}))}i.d(t,{deleteDeletedAudios:()=>s})},580260:(e,t,i)=>{"use strict";function s(e,t){AudioUtils.deleteAudio(e,t,!1,!1,!0)}i.d(t,{deleteListenedAudio:()=>s})},926100:(e,t,i)=>{"use strict";function s(e,t){AudioUtils.deleteAudio(e,t,!1,!0)}i.d(t,{deleteRecomsAudio:()=>s})},81679:(e,t,i)=>{"use strict";i.d(t,{getDurationMod:()=>a,drawAudio:()=>o});i(59357),i(751876);var s=i(120290);function a(e){return e<600?"s":e<3600?"m":e<36e3?"l":"n"}function o(e,t){for(var i=JSON.parse(getTemplate("audio_bits_to_cls")),o=e[AudioUtils.AUDIO_ITEM_INDEX_FLAGS],l=[],r=0;r<32;r++){var d=1<<r;o&d&&l.push(i[d])}var n=(0,s.asObject)(e),u=AudioUtils.isPodcast(e);u&&(l.push("audio_podcast"),AudioUtils.isPrivatePodcast(e)&&l.push("audio_podcast_private")),t&&l.push(t);var _="";if(e[AudioUtils.AUDIO_ITEM_INDEX_COVER_URL]){var c=e[AudioUtils.AUDIO_ITEM_INDEX_COVER_URL].split(",");_="background-image: url("+c[0]+")"}var h,p=AudioUtils.getAudioPerformers(e),g=e[AudioUtils.AUDIO_ITEM_INDEX_DURATION],A=formatTime(g),y=clean(JSON.stringify(e));try{var f=getTemplate("podcast_row",e);h=u&&f?f:getTemplate("audio_row",e)}catch(e){return""}var v="";return n.hasTrackPage&&(l.push("audio_has_track_page"),v=`/audio${n.trackPageId}`),h=(h=(h=(h=(h=(h=(h=(h=(h=h.replace(/%cls%/,(()=>l.join(" ")))).replace(/%duration%/,(()=>A))).replace(/%serialized%/,(()=>y))).replace(/%cover_style%/,(()=>_))).replace(/%performers%/,(()=>p))).replace(/%track_url%/,(()=>v))).replace(/%duration_mod%/,(()=>a(g)))).replace(/%chart_info_position%/,(()=>{return(t=e[AudioUtils.AUDIO_ITEM_CHART_INFO_INDEX]&&e[AudioUtils.AUDIO_ITEM_CHART_INFO_INDEX].position)?`<div class="audio_row__position">${t}</div>`:"";var t}))).replace(/%chart_info_state%/,(()=>function(e){var t="";switch(e){case 0:t="audio_row__state-new_release";break;case 1:t="audio_row__state-no_changes";break;case 2:t="audio_row__state-moved_up";break;case 3:t="audio_row__state-moved_down";break;case 4:t="audio_row__state-crown";break;default:t=""}return t?`<div class="audio_row__state ${t}"></div>`:""}(e[AudioUtils.AUDIO_ITEM_CHART_INFO_INDEX]&&e[AudioUtils.AUDIO_ITEM_CHART_INFO_INDEX].state)))}},263677:(e,t,i)=>{"use strict";function s(e,t,i){showBox("al_audio.php",{act:"edit_audio_box",aid:t.fullId,force_edit_hash:i},{params:{width:"456px",bodyStyle:"padding: 20px;",hideButtons:1},dark:1})}i.d(t,{editAudio:()=>s})},873040:(e,t,i)=>{"use strict";i.d(t,{getActionIcon:()=>p});var s=i(908928),a=i(221324),o=i(685098),l=i(177801),r=i(14377),d=i(385023),n=i(743707),u=i(784502),_=i(244030),c=i(165266),h={current_delete:(0,u.getIcon20Cancel)(),recoms_delete:(0,u.getIcon20Cancel)(),listened_delete:(0,u.getIcon20Cancel)(),delete:(0,u.getIcon20Cancel)(),restore_recoms:(0,n.getIcon20Add)(),more:(0,c.getIcon20More)(),edit:(0,l.getIcon20WriteOutline)(),recoms:(0,o.getIcon20Stars)()};function p(e){var t=h[e],i="";if(t)i=g(t);else switch(e){case"add":i=g((0,_.getIcon20Check)())+g((0,n.getIcon20Add)());break;case"next":i=`<div class="audio_row__icon--horizontal">${g((0,r.getIcon20ListPlayOutline)())+g((0,d.getIcon20ListAddOutline)())}</div>`;break;case"fave":i=g((0,s.getIcon24FavoriteOutline)())+g((0,a.getIcon24Favorite)())}return i}function g(e){return`<div class="audio_row__icon audio_row__icon_${e.name}">${e.icon}</div>`}},894391:(e,t,i)=>{"use strict";function s(){return AudioUtils._audioAddRestoreInfo=AudioUtils._audioAddRestoreInfo||{},AudioUtils._audioAddRestoreInfo}i.d(t,{getAddRestoreInfo:()=>s})},717051:(e,t,i)=>{"use strict";function s(e){return"object"==typeof(e=AudioUtils.asObject(e)).extra?e.extra:JSON.parse(e.extra||"{}")}i.d(t,{getAudioExtra:()=>s})},78838:(e,t,i)=>{"use strict";i.d(t,{getAudioFromEl:()=>a});var s=i(315544);function a(e,t){e=(0,s.domClosest)("_audio_row",e);var i=(0,s.data)(e,"audio")||JSON.parse((0,s.domData)(e,"audio"));if(!i)return null;if(t){(i=AudioUtils.asObject(i)).isDeleted=(0,s.hasClass)(e,"audio_row__deleted"),i.isCurrent=(0,s.hasClass)(e,AudioUtils.AUDIO_CURRENT_CLS),i.isPlaying=(0,s.hasClass)(e,AudioUtils.AUDIO_PLAYING_CLS),i.isFromCurrentPlaylist=!!(0,s.gpeByClass)("_audio_section__current",e),i.isNumeric=!!(0,s.gpeByClass)("audio_numeric",e),i.isWithCovers=!!(0,s.gpeByClass)("audio_w_covers",e),i.withInlinePlayer=!i.isWithCovers&&!(0,s.gpeByClass)("audio_no_inline_player",e),i.isInSnippet=!!(0,s.gpeByClass)("_audio_pl_snippet__list",e),i.isInEditBox=!!(0,s.gpeByClass)("_audio_pl_edit_box",e),i.isInRecomsBlock=!!(0,s.gpeByClass)("_audio_recoms_blocks",e),i.isInFastChat=!!(0,s.gpeByClass)("fc_tab",e),i.isInAttach=!!(0,s.gpeByClass)("media_preview",e),i.isSetClaimed=(0,s.hasClass)(e,"audio_moder_claimed"),i.isPodcastListSnippet=(0,s.hasClass)(e,"podcast_list_snippet");var a=(0,s.gpeByClass)("_audio_pl",e);i.isCurrentAlbumSnippet=!!i.album&&!!a&&a.dataset.playlistId===`playlist_${i.album[0]}_${i.album[1]}`}return i}},729956:(e,t,i)=>{"use strict";i.d(t,{getAudioFullId:()=>a});var s=i(820587);function a(e){return e[s.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[s.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID]}},493045:(e,t,i)=>{"use strict";i.d(t,{isClaimedAudio:()=>s});i(176774);function s(e){return!!e&&(e=AudioUtils.asObject(e)).flags&AudioUtils.AUDIO_ITEM_CLAIMED_BIT}},979663:(e,t,i)=>{"use strict";i.d(t,{onAudioChoose:()=>l});var s=i(695724),a=i(315544),o=i(49535);function l(e,t,i,l){if((0,s.isUndefined)(t.selected)){var r=cur.attachCount&&cur.attachCount()||0,d=i.fullId+(i.accessKey?"_"+i.accessKey:"");if(cur.chooseMedia("audio",d,l),(!cur.attachCount||cur.attachCount()>r)&&cur.lastAddMedia){t.selected=cur.lastAddMedia.chosenMedias.length-1,(0,a.addClass)((0,a.domPN)(t),"audio_selected");var n=(0,a.getSize)(t)[0];(0,a.setStyle)(t,"width",n),t.innerHTML=getLang("global_cancel")}}else cur.lastAddMedia.unchooseMedia(t.selected),t.selected=void 0,(0,a.removeClass)((0,a.domPN)(t),"audio_selected"),t.innerHTML=getLang("global_add_media");return(0,o.cancelEvent)(e)}},934495:(e,t,i)=>{"use strict";i.d(t,{onRowLeave:()=>a});var s=i(315544);function a(e){(0,s.data)(e,"leaved",!0);var t=(0,s.data)(e,"tt");if((!t||!t.isShown())&&(clearTimeout(window.audioRowHoverTO),(0,s.data)(e,"actions"))){var i=(0,s.geByClass1)("_audio_row__actions",e),a=(0,s.geByClass1)("_audio_row__duration",e);re(i),(0,s.setStyle)(a,"visibility","visible"),(0,s.data)(e,"actions",0)}}},505260:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{onRowOver:()=>onRowOver});var core_js_modules_es6_array_from__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(530522),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(66108),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(296253),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(991181),core_js_modules_es7_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(579665),core_js_modules_es6_symbol__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(95767),_lib_dom__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(315544),_lib_dom_events__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(49535),_web_audio_player_track_getActionIcon__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(873040);function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var i=[],s=!0,a=!1,o=void 0;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(i.push(l.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function onRowOver(audioEl,event,forceRedraw){(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.hasClass)(audioEl,"podcast_list_snippet")||(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.hasClass)(audioEl,"podcast_snippet__controls")||((0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.data)(audioEl,"leaved",!1),(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.data)(audioEl,"actions")&&!forceRedraw||(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.hasClass)(audioEl,"no_extra")||(clearTimeout(window.audioRowHoverTO),window.audioRowHoverTO=setTimeout((()=>{window.tooltips&&"function"==typeof window.tooltips.hideAll&&window.tooltips.hideAll(audioEl);var audio=AudioUtils.getAudioFromEl(audioEl),audioObject=AudioUtils.getAudioFromEl(audioEl,!0),actions=[],moreActions=[],context=AudioUtils.getContextPlaylist(audioEl,!0),_AudioUtils$contextSp=AudioUtils.contextSplit(context),_AudioUtils$contextSp2=_slicedToArray(_AudioUtils$contextSp,2),sectionContext=_AudioUtils$contextSp2[0],blockContext=_AudioUtils$contextSp2[1],extra=AudioUtils.getAudioExtra(audioObject);if(context=sectionContext,audioObject.isDeleted)if(AudioUtils.isPodcast(audioObject))actions.push(["add",AudioUtils.restoreEpisode,"",'onmouseover="audioShowActionTooltip(this)"']);else if("recoms_recoms"===context)actions.push(["restore_recoms",AudioUtils.addAudio,"",'onmouseover="audioShowActionTooltip(this)"']);else{var deleteRestoreInfo=AudioUtils.getAddRestoreInfo();deleteRestoreInfo[audioObject.fullId]&&deleteRestoreInfo[audioObject.fullId].deleteAll&&actions.push(["delete",AudioUtils.deleteAudio,"",'onmouseover="audioShowActionTooltip(this)"']),actions.push(["add",AudioUtils.addAudio,"",'onmouseover="audioShowActionTooltip(this)"'])}else{var actionsList=["next","add","share","open_album","add_to_playlist"];if(extra.claim&&nav.objLoc.claim||audioObject.isReplaceable)actionsList=[];else if(AudioUtils.isPodcast(audioObject))actionsList=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.hasClass)(audioEl,"audio_podcast_no_actions")?[]:["fave","edit","delete","open_episode","share"];else if(AudioUtils.isArticleTts(audioObject))actionsList=[];else if(audioObject.isFromCurrentPlaylist)actionsList=["recoms","add",!audioObject.isCurrent&&"current_delete","share","open_album","add_to_playlist"];else if(audioObject.isInSnippet)actionsList=["recoms","next","edit","add","share","open_album","add_to_playlist"];else if(audioObject.isInEditBox)actionsList=[];else if(audioObject.isInFastChat)actionsList=["add"];else if(vk.widget)actionsList=["add"];else if(context)if("my_audios_block"===blockContext)actionsList=["recoms","edit","next","add","delete","share","open_album","add_to_playlist"];else switch(context){case"album_page":actionsList=["recoms","next","edit","add","share","open_album","add_to_playlist"];break;case"my":case"my_audios_short":case"module":case"user_list":case"group_list":actionsList=["recoms","edit","next","add","delete","share","open_album","add_to_playlist"];break;case"edit_playlist":actionsList=["add","next","edit"];break;case"recoms_recoms":actionsList=["recoms","next","add","recoms_delete","share","open_album","add_to_playlist"];break;case"recoms_recent_audios":actionsList=["recoms","edit","next","add","listened_delete","share","open_album","add_to_playlist"];break;case"attach":case"attach_preview":case"podcast":actionsList=[];break;case"search_results":"search_owned_audios"===blockContext&&(actionsList=["recoms","edit","next","add","delete","share","open_album","add_to_playlist"]);break;case"recommendations":"recoms_recoms_detail"===blockContext&&(actionsList=["recoms","next","add","recoms_delete","share","open_album","add_to_playlist"]);break;case"apps_edit":actionsList=["apps_edit_delete"];break;default:audioObject.isCurrent&&audioObject.withInlinePlayer&&(actionsList=["recoms","add","share","open_album","add_to_playlist"])}("moderation_video"===context||window.AdminVideoCatalogue)&&(actionsList=["link_to_clip"]),actionsList.push("uma"),audioObject.isReplaceable&&actionsList.push("replace"),extra.moder_actions&&each(extra.moder_actions,((i,act)=>{moreActions.push(["moder_"+i,(audioEl,audio)=>{eval(act[1])},act[2]])})),audioObject.isCurrentAlbumSnippet&&(actionsList=actionsList.filter((e=>"open_album"!==e))),vk.id||(actionsList=actionsList.filter((e=>"open_album"===e)));var ap=getAudioPlayer(),currentAudioPage=window.currentAudioPage&&window.currentAudioPage(audioEl),isInLayer=currentAudioPage&&currentAudioPage.isLayer(),shouldShowEdit=!isInLayer&&audioObject.canEdit&&!vk.widget&&(AudioUtils.isPodcast(audioObject)||inArray(context,["my","my_audios_short","group_list","search_results","my_playlists"]));each(actionsList,((e,t)=>{switch(t){case"next":audioObject.isCurrent||audioObject.isClaimed||AudioUtils.isPodcast(audioObject)||actions.push(["next",ap.setNext.bind(ap),"",'onmouseover="audioShowActionTooltip(this)"']);break;case"restore_recoms":actions.push(["restore_recoms",AudioUtils.addAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"add":var i=vk.id;cur.audioPage&&cur.audioPage.canAddToGroup()&&cur.audioPage.getOwnerId()!==audioObject.ownerId&&(i=cur.audioPage.getOwnerId()),!audioObject.isClaimed&&audioObject.canAdd&&audioObject.ownerId!=i&&actions.push(["add",AudioUtils.addAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"recoms":!audioObject.isClaimed&&cur.audioPage&&actions.push(["recoms",AudioUtils.showRecoms,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"uma":audioObject.isUMA&&actions.push(["uma",AudioUtils.getUMAInfo,"UMA"]);break;case"replace":audioObject.isReplaceable&&actions.push(["replace",()=>{showAudioClaimWarning(audioObject,extra.claim,AudioUtils.replaceWithOriginal.bind(AudioUtils,audioEl,audioObject))},getLang("global_audio_replace")]);break;case"edit":shouldShowEdit&&actions.push(["edit",AudioUtils.isPodcast(audioObject)?AudioUtils.editEpisode:AudioUtils.editAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"delete":!audioObject.canDelete||audioObject.isInRecomsBlock||vk.widget||actions.push(["delete",AudioUtils.isPodcast(audioObject)?AudioUtils.deleteEpisode:AudioUtils.deleteAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"current_delete":actions.push(["current_delete",AudioUtils.deleteCurrentAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"recoms_delete":actions.push(["recoms_delete",AudioUtils.deleteRecomsAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"listened_delete":audioObject.isInRecomsBlock||actions.push(["listened_delete",AudioUtils.deleteListenedAudio,"",'onmouseover="audioShowActionTooltip(this)"']);break;case"apps_edit_delete":actions.push(["delete",window.AppsEdit.removeAudio,"",'onmouseover="AppsEdit.showRemoveAudioTooltip(this)"']);break;case"fave":AudioUtils.isPodcast(audioObject)&&actions.push(["fave",AudioUtils.faveEpisode,"",'onmouseover="audioShowActionTooltip(this)"',AudioUtils.getAudioExtra(audioObject).fave?" activated":""]);break;case"share":audioObject.isClaimed||moreActions.push(["share",AudioUtils.shareAudio,getLang("audio_share_audio")]);break;case"add_to_playlist":audioObject.isClaimed||cur.viewAsBox||moreActions.push(["add_to_playlist","",getLang("audio_add_to_playlist")]);break;case"open_album":!audioObject.isClaimed&&audioObject.album&&moreActions.push(["open_album",AudioUtils.showAudioAlbum,getLang("audio_open_album")]);break;case"open_episode":AudioUtils.isPodcast(audioObject)&&moreActions.push(["open_episode",AudioUtils.openEpisode,getLang("audio_podcast_open_episode")])}})),extra.claim&&nav.objLoc.claim&&(audioObject.isSetClaimed?actions.push(["claim_btn",AudioUtils.unclaim.bind(this,audio,audioEl,extra.claim),"Unclaim"]):actions.push(["claim_btn",AudioUtils.claim.bind(this,audio,audioEl,extra.claim),"Claim"]))}if(moreActions.length&&actions.push(["more"]),actions.length){var actionsEl=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.se)('<div class="_audio_row__actions audio_row__actions"></div>');each(actions,((e,t)=>{var i=AudioUtils.getRowActionName(t[0],audioObject,audioEl),s=(0,_web_audio_player_track_getActionIcon__WEBPACK_IMPORTED_MODULE_8__.getActionIcon)(t[0]),a=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.se)(`<button\naria-label="${i}"\ndata-action="${t[0]}"\nclass="audio_row__action audio_row__action_${t[0]} _audio_row__action_${t[0]}${t[4]?" "+t[4]:""}" ${t[3]||""}>\n${t[2]||s}\n</button>`);t[1]&&a.addEventListener("click",(e=>(t[1]&&t[1].call(window,audioEl,audioObject),(0,_lib_dom_events__WEBPACK_IMPORTED_MODULE_7__.cancelEvent)(e)))),actionsEl.appendChild(a)}));var rectoreInfo=AudioUtils.getAddRestoreInfo(),audioRestorationInfo=rectoreInfo[audioObject.fullId];audioRestorationInfo&&rectoreInfo[audioRestorationInfo.addedFullId]&&(audioRestorationInfo=null),audioRestorationInfo&&"added"===audioRestorationInfo.state&&addClass(audioEl,"audio_row__added");var rowInfoEl=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.geByClass1)("_audio_row__info",audioEl),rowDurationEl=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.geByClass1)("_audio_row__duration",audioEl),rowAlreadyActionsEl=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.geByClass1)("_audio_row__actions",audioEl);if(!rowInfoEl)return;(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.re)(rowAlreadyActionsEl),(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.setStyle)(rowDurationEl,"visibility","hidden"),rowInfoEl.appendChild(actionsEl);var moreActionsBtnEl=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.geByClass1)("_audio_row__action_more",actionsEl);moreActions.length&&moreActionsBtnEl&&setMoreAction(audioEl,audio,audioObject,moreActions,moreActionsBtnEl),(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.data)(audioEl,"actions",1)}}),forceRedraw?0:10)))}function setMoreAction(e,t,i,s,a){var o=gpeByClass("im-page_classic",e),l=gpeByClass("_im_peer_history_w",e),r=gpeByClass("_im_peer_history",e),d=gpeByClass("_im_chat_body_abs",e),n=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.se)('<div class="_audio_row__more_actions audio_row__more_actions"></div>'),u=gpeByClass("wk_history_audio_content",e),_=e.closest(".CatalogBlock"),c={};r?(c.getWrapEl=()=>o?null:d,c.appendTo=r):u?c.appendTo=u:_?c.appendTo=_:gpeByClass("post",e)?c.appendTo=document.body:c.appendToParent=!0;var h=new ElementTooltip(a,extend({cls:"_audio_row__tt",defaultSide:"bottom",rightShift:20,content:n,bottomGap:o&&l?parseInt(getStyle(l,"border-bottom-width"))+30+150:150,preventSideChange:!0,autoShow:!0,onFirstTimeShow:function(e,t){(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.domData)(t,"nodrag",1),setTimeout(function(){this.getOptions().bottomGap=0}.bind(this))},onHide:()=>{(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.data)(e,"leaved")&&AudioUtils.onRowLeave(e)}},c));each(s,((s,a)=>{var o,l,r=(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.se)((0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.rs)(AudioUtils.AUDIO_ROW_ACTION_ROW_ITEM,a));"add_to_playlist"===a[0]?(r.addEventListener("mouseenter",o=()=>{clearTimeout(l),l=setTimeout((()=>{r.removeEventListener("mouseenter",o),AudioUtils.initRowPlaylistsChooser(t,r,h)}),150)}),r.addEventListener("click",(()=>{l||AudioUtils.initRowPlaylistsChooser(t,r,h)})),r.addEventListener("mouseleave",(()=>{clearTimeout(l)}))):r.addEventListener("click",(t=>(a[1].call(window,e,i),(0,_lib_dom_events__WEBPACK_IMPORTED_MODULE_7__.cancelEvent)(t))));n.appendChild(r)})),addEvent(a,"click",(e=>{h.isShown()||h.show(),(0,_lib_dom_events__WEBPACK_IMPORTED_MODULE_7__.cancelEvent)(e)})),(0,_lib_dom__WEBPACK_IMPORTED_MODULE_6__.data)(e,"tt",h)}},373761:(e,t,i)=>{"use strict";i.d(t,{replaceWithOriginal:()=>a});var s=i(315544);function a(e,t,i){(t=t||getAudioPlayer().getCurrentAudio())&&(t=AudioUtils.asObject(t),ajax.post("al_audio.php",{act:"replace_with_original",hash:t.replaceHash,audio_id:t.fullId},{onDone:function(a){var o=JSON.parse(t.extra).claim.original;o[AudioUtils.AUDIO_ITEM_INDEX_ID]=a,o[AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]=t.ownerId;var l=(0,s.se)(AudioUtils.drawAudio(o));e.parentElement.insertBefore(l,e),e.parentElement.removeChild(e),i&&i()},onFail:()=>(i(),!0)}))}},531254:(e,t,i)=>{"use strict";i.d(t,{shareAudio:()=>o});var s=i(185850),a=i(986773);function o(e,t){if(cur.viewAsBox)return cur.viewAsBox();if(t=t||getAudioPlayer().getCurrentAudio()){t=AudioUtils.asObject(t);var i=AudioUtils.isPodcast(t)?"podcast":"audio";return(0,a.onAdditionalEvent)(e,t,{type:s.TYPE_SHARE_AUDIO}),!showBox("like.php",{act:"publish_box",object:i+t.fullId,list:t.actionHash,to:"mail"},{stat:["page.js","page.css","wide_dd.js","wide_dd.css",jsc("web/sharebox.js")],onFail:function(e){return showDoneBox(e),!0}})}}},21734:(e,t,i)=>{"use strict";i.d(t,{showAudioRestriction:()=>y});var s=i(120290),a=i(81679),o=i(820587),l=i(315544),r=i(982452),d=i(850167),n=i(654612),u=i(460615),_=i(40906),c=i(124041),h=i(420130),p=i(785039);function g(e){var t=c.FlatButton.render({children:getLang("global_close"),appearance:c.FlatButtonAppearance.PRIMARY,size:c.FlatButtonSize.M,restAttrs:{onclick:"curBox().hide()"}});(0,n.showFastBox)({hideButtons:!0,title:!1,containerClass:"audio_restriction_box",onHide:()=>{(0,u.statlogsValueEvent)("audio_restriction_popup","hide",e.restrictionStatus)}},`\n    <button class="audio_restriction_box__close" onclick="curBox().hide()" aria-label="${getLang("global_close")}">\n      ${(0,h.getIcon24Cancel)().icon}\n    </button>\n    <div class="audio_restriction_box__icon">${(0,p.getIcon56PensiveFace)().icon}</div>\n    <div class="audio_restriction_box__title">${getLang("audio_restriction_title_claim")}</div>\n    <div class="audio_restriction_box__controls">\n      ${t}\n    </div>\n  `)}function A(e){var t=(0,l.geByClass)("_audio_row_"+e.fullId);if(!t||!t.length)return!1;var i=(0,r.parseJSON)((0,l.domData)(t[0],"audio"));if(!i)return!1;var s=(0,r.parseJSON)(i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA]);s&&delete s.claim,i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION]=0,i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&=~o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CLAIMED_BIT,i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA]=JSON.stringify(s);var n=(0,d.getAudioPlayer)().getCurrentPlaylist(),u=(0,l.se)((0,a.drawAudio)(i,"no_extra"));if(n){var _=i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID],c=n.getAudio(_);c&&(c[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION]=i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION],c[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]=i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS],c[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA]=i[o.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA])}return each(t,((e,t)=>{var s=e>0?(0,l.se)((0,a.drawAudio)(i,"no_extra")):u;t.parentElement.insertBefore(s,t),t.parentElement.removeChild(t)})),u}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;if((e=(0,s.asObject)(e)).restrictionStatus){if(e.actionHash){(0,u.statlogsValueEvent)("audio_restriction_popup","show",e.restrictionStatus);var i=(0,n.showBox)("al_audio.php",{act:"restriction_box",audio_id:e.id,owner_id:e.owner_id,hash:e.actionHash},{params:{hideButtons:!0,onShow:function(){var i=curBox();(0,_.isFunction)(t.onShow)&&t.onShow(),i&&i.once("click:ok",(()=>{(0,u.statlogsValueEvent)("audio_restriction_popup","click",e.restrictionStatus)}))},onHide:i=>{(0,_.isFunction)(t.onHide)&&t.onHide(),i||(0,u.statlogsValueEvent)("audio_restriction_popup","hide",e.restrictionStatus)}},containerClass:"audio_restriction_box audio_restriction_box_type_"+e.restrictionStatus,onDone:(t,i)=>{if(i&&i.play){t.hide();var a=A(i.audio?(0,s.asObject)(i.audio):e),o=(0,d.getAudioPlayer)();a&&o.toggleAudio(a,{target:a})}},onFail:()=>(i&&i.hide(),g(e),!0)})}else g(e);return!0}return!1}},402297:(e,t,i)=>{"use strict";i.d(t,{toggleAudioLyrics:()=>a});var s=i(315544);function a(e,t){var i=(0,s.geByClass1)("_audio_row__lyrics",e);if(i){if((0,s.toggle)(i)){var a=(0,s.getSize)(e)[1],o=(0,s.getSize)(i)[1];(0,s.setStyle)(e,"height",a+o),(0,s.data)(e,"prevHeight",a)}else{var l=(0,s.data)(e,"prevHeight");(0,s.setStyle)(e,"height",l)}}else{(0,s.addClass)(e,"audio_loading");var r={act:"get_lyrics",aid:t.fullId,lid:t.lyrics};AudioUtils.isPodcast(t)&&(r.podcast=!0),ajax.post("al_audio.php",r,{onDone:function(a){(0,s.removeClass)(e,"audio_loading"),i=(0,s.se)(`<div class="_audio_row__lyrics audio_row__lyrics" data-nodrag="1" style="display:none;"><div class="audio_row__lyrics_inner">${a}</div></div>`),(0,s.geByClass1)("_audio_row_content",e).appendChild(i),AudioUtils.toggleAudioLyrics(e,t)},onFail:()=>!0})}}},703912:(e,t,i)=>{"use strict";i.d(t,{unclaim:()=>a});var s=i(315544);function a(e,t,i){(0,s.removeClass)(t,"audio_moder_claimed"),AudioUtils.onRowOver(t,!1,!0),e=AudioUtils.asObject(e),ajax.post("al_claims.php",{act:"a_unclaim",claim:i,type:"audio",id:e.id,owner_id:e.ownerId,hash:e.actionHash})}},782928:(e,t,i)=>{"use strict";i.d(t,{initUpload:()=>a});i(175115),i(59357),i(751876);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},s.apply(this,arguments)}function a(e,t,i,a,o,l,r,d,n,u,_,c){cur.loadAudioDone=function(t,i){if(cur.audioPage){if(cur.boxClose&&cur.audioPage.onAudioAllUploaded(),cur.audioPage.onAudioUploaded(t,i),cur.boxClose){delete cur.boxClose;var s=cur.audiosLoaded>1?getLang("audio_success_msg_multiple"):getLang("audio_success_msg");e.setOptions({title:getLang("audio_uploading_over"),bodyStyle:"padding: 16px 23px;"}),e.content(s),hide(e.progress),setTimeout((function(){e.hide(200)}),2e3),delete cur.audiosLoaded,_tbLink&&_tbLink.loc&&(cur.__phinputs=cur.__phinputs||[],globalHistoryDestroy(_tbLink.loc))}}else cur.boxClose&&nav.go("/audios"+i[AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID],!1,{onDone:function(){cur.__phinputs=cur.__phinputs||[],globalHistoryDestroy(nav.objLoc[0])}})},cur.loadAudioFailed=function(i,s){hide(e.progress),Upload.embed(i);var a=ge("audio_new_error"),o=a&&domFC(a),l=s.split("|");o&&(s=l[0],l=l[1],o.innerHTML=l||(t[s]||getLang("audio_loading_error").replace("{code}",intval(s))),show(a))},Upload.init("audio_add_upload_btn",i,a,{file_name:"file",file_size_limit:o,file_types_description:"Audio files (*.mp3)",file_types:"*.mp3;*.MP3",accept:"audio/mpeg",lang:l,onUploadStart:function(t,i){"form"===Upload.types[t]&&show(e.progress),"form"!==Upload.types[t]&&"fileApi"!==Upload.types[t]||(geByClass1("file",ge("audio_add_upload_btn")).disabled=!0),curBox().changed=!0},onUploadProgress:function(e,t,i){if(!ge("form"+e+"_progress")){for(var s=Upload.obj[e],a=getSize(s)[1]/2+10,o=s.firstChild;o;)1===o.nodeType&&(o.id==="uploader"+e&&browser.msie?setStyle(o,{position:"relative",left:"-5000px"}):setStyle(o,{visibility:"hidden"})),o=o.nextSibling;s.appendChild(ce("div",{innerHTML:'<div class="audio_progress_wrap"><div id="form'+e+'_progress" class="audio_progress" style="width: 0%;"></div></div></div>'},{height:a+"px",marginTop:-a+"px"}))}var l=intval(t/i*100);setStyle(ge("form"+e+"_progress"),{width:l+"%"})},onUploadComplete:function(e,t){var i;this.use_go_uploader||(t=t.replace(/\+/g," "));try{i=JSON.parse(t)}catch(e){i=AjaxConvert.fromQueryString(t)}var a={};this.use_go_uploader?a={act:"done_add",upldr:1,go_uploader_response:t}:(i.title=decodeURIComponent(i.title),i.artist=decodeURIComponent(i.artist),a=s({},i,{},{act:"done_add",upldr:1})),i.code?cur.loadAudioFailed(e,i.code):ajax.post("al_audio.php",a,{onDone:function(t){cur.loadAudioDone(e,t)},onFail:function(t){return cur.loadAudioFailed(e,t),!0}})},onUploadCompleteAll:function(e,t){cur.boxClose=!0},onUploadError:cur.loadAudioFailed,clear:1,multiple:1,force_max_files:!0,max_files:r,max_files_hide_last:1,type:"audio",max_attempts:3,reverse_files:1,server:d,error:n,error_hash:u,dropbox:"choose_audio_dropbox",use_go_uploader:c}),e.setControlsText(_)}},700688:(e,t,i)=>{"use strict";function s(e,t){t.isInEditBox||showBox("al_audio.php",{act:"get_uma_restrictions",id:t.id,owner_id:t.owner_id,hash:t.actionHash},{params:{width:1e3}})}i.d(t,{getUMAInfo:()=>s})},251980:(e,t,i)=>{"use strict";function s(e,t){t.isInEditBox||showBox("al_audio.php",{act:"get_uma_restrictions_album",playlist_raw_id:e},{params:{width:750}})}i.d(t,{getUMAInfoAlbum:()=>s})},45634:(e,t,i)=>{"use strict";i.d(t,{AudioUtils:()=>Ue});i(175115);var s=i(820587),a=i(867696),o=i(402297),l=i(442277),r=i(505260),d=i(934495),n=i(759448),u=i(403753),_=i(271891),c=i(459285),h=i(739724),p=i(531254),g=i(234247),A=i(425209),y=i(373761),f=i(263677),v=i(798783),P=i(875751),m=i(926100),E=i(580260),I=i(569272),w=i(888614),C=i(750288),b=i(600732),L=i(747447),U=i(949002),T=i(563767),O=i(979663),S=i(409082),D=i(548616),x=i(703780),R=i(285200),k=i(869053),M=i(655700),B=i(160260),N=i(894391),j=i(207879),F=i(874229),H=i(59943),W=i(597970),Y=i(844900),K=i(81679),X=i(493045),V=i(717051),G=i(78838),$=i(729956),Q=i(120290),q=i(517097),z=i(295224),J=i(270605),Z=i(930982),ee=i(438022),te=i(703912),ie=i(700688),se=i(251980),ae=i(141593),oe=i(748409),le=i(470353),re=i(12733),de=i(849115),ne=i(557761),ue=i(568062),_e=i(734264),ce=i(21734),he=i(430463),pe=i(984287),ge=i(463091),Ae=i(636760),ye=i(840887),fe=i(190347),ve=i(285132),Pe=i(291976),me=i(57472),Ee=i(953054),Ie=i(782928),we=i(355145),Ce=i(920817),be=i(254492);function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Le.apply(this,arguments)}var Ue=Le({},s.AUDIO_PLAYER_ENUMS,{audioSearchPerformer:a.audioSearchPerformer,toggleAudioLyrics:o.toggleAudioLyrics,getRowActionName:l.getRowActionName,initRowPlaylistsChooser:_.initRowPlaylistsChooser,addToPlaylistsBoxInit:c.addToPlaylistsBoxInit,showRecoms:h.showRecoms,shareAudio:p.shareAudio,showAudioAlbum:g.showAudioAlbum,openEpisode:A.openEpisode,replaceWithOriginal:y.replaceWithOriginal,editAudio:f.editAudio,editEpisode:v.editEpisode,deleteCurrentAudio:P.deleteCurrentAudio,deleteRecomsAudio:m.deleteRecomsAudio,deleteListenedAudio:E.deleteListenedAudio,deleteAudio:I.deleteAudio,deleteEpisode:w.deleteEpisode,restoreEpisode:C.restoreEpisode,deleteDeletedAudios:b.deleteDeletedAudios,faveEpisode:L.faveEpisode,contextSplit:U.contextSplit,showAudioPlaylist:T.showAudioPlaylist,editPlaylist:D.editPlaylist,followPlaylist:x.followPlaylist,getLayer:R.getLayer,updateQueueReceivedPost:k.updateQueueReceivedPost,toggleAudioHQBodyClass:M.toggleAudioHQBodyClass,hasAudioHQBodyClass:B.hasAudioHQBodyClass,getAddRestoreInfo:N.getAddRestoreInfo,addAudio:j.addAudio,addAudioToOwner:F.addAudioToOwner,chooseAudioBox:H.chooseAudioBox,getAudioArtistsString:W.getAudioArtistsString,getAudioPerformers:Y.getAudioPerformers,drawAudio:K.drawAudio,isClaimedAudio:X.isClaimedAudio,getDurationMod:K.getDurationMod,getAudioExtra:V.getAudioExtra,getAudioFromEl:G.getAudioFromEl,getAudioFullId:$.getAudioFullId,asObject:Q.asObject,initDomPlaylist:q.initDomPlaylist,getContextPlaylist:z.getContextPlaylist,renderAudioDiag:Z.renderAudioDiag,claim:ee.claim,unclaim:te.unclaim,getUMAInfo:ie.getUMAInfo,getUMAInfoAlbum:se.getUMAInfoAlbum,cancelReplacement:ae.cancelReplacement,removeFromGroup:oe.removeFromGroup,addToGroupBox:le.addToGroupBox,showAudioRestriction:ce.showAudioRestriction,isPodcast:re.isPodcast,isArticleTts:de.isArticleTts,isPrivatePodcast:ne.isPrivatePodcast,followArtist:ge.followArtist,unfollowArtist:Ae.unfollowArtist,followCurator:ye.followCurator,unfollowCurator:fe.unfollowCurator,followOwner:ve.followOwner,unfollowOwner:Pe.unfollowOwner,trackArtistToOfficial:me.trackArtistToOfficial,PodcastsLogs:ue,copyPlaylistLink:_e.copyPlaylistLink,getAlbumParts:he.getAlbumParts,drawAlbumPartRow:pe.drawAlbumPartRow,onRowOver:r.onRowOver,onRowLeave:d.onRowLeave,onAudioAddedToPlaylist:n.onAudioAddedToPlaylist,onAudioChoose:O.onAudioChoose,onPlaylistChoose:S.onPlaylistChoose,claimPlaylist:Ee.claimPlaylist,initUpload:Ie.initUpload,turnPlaylistDiscover:we.turnPlaylistDiscover,hidePlaylistFromRecoms:Ce.hidePlaylistFromRecoms,showPlaylistInRecoms:be.showPlaylistInRecoms,_showPlaylistsChooser:u.showPlaylistsChooser,debugLog:J.debugLog})},105832:(e,t,i)=>{"use strict";function s(e){return e&&e<=-2e9&&e>=-2002e6}i.d(t,{checkIsOfficialPlaylist:()=>s})},782508:(e,t,i)=>{"use strict";i.d(t,{connectListenQueue:()=>c});var s=i(511867),a=i(143707),o=i(19331),l=null,r=null,d=!1,n=0,u=new s.WebQueueListener((function(e){if(e.failed)return void c(!0);for(var t=getAudioPlayer(),i=t.isPlaying(),s=t.getCurrentAudio(),a=AudioUtils.isPodcast(s),o=0;o<e.events.length;o++){var l=e.events[o].data;if("start"===l.type&&AudioPlayer.getDeviceId()!==l.uuid&&!r&&!a&&i){t.pausedByQueue=Date.now(),t.pause(),r=showBox("al_audio.php",{act:"start_playback_box",uuid:l.uuid,device_name:l.device_name},{params:{hideButtons:!0,onHide:()=>{r=!1}},containerClass:"audio_playback_box"});break}}})),_=new s.WebQueueListener((function(e){e.events.length&&e.events.forEach((e=>{1===e.data.product_id&&(vk.audioAdsConfig.enabled=!e.data.active)}))}));function c(e){if(window.Notifier&&vk.id){var t=window.ap&&getAudioPlayer(),i=t&&t.getCurrentAudio(),s=window.Notifier&&!vk.widget,r=!d&&i?u.listenQueueKey:_.listenQueueKey,h=AudioUtils.isPodcast(i);(e||s&&!h&&!r)&&(i||(0,o.partConfigEnabled)("audio_subscription_update"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;ajax.post("al_audio.php",{act:"queue_params",audio_id:e.id,owner_id:e.owner_id,hash:e.actionHash},{onDone:t,onFail:i})}(i=i?AudioUtils.asObject(i):{},(e=>{var t=function(e){var t=(0,a.unpackQueues)(e);t.audio&&u.connect(t.audio);t.subscription&&_.connect(t.subscription);return t}(e);d=!i||!t.audio,(t.audio||t.subscription)&&(l&&clearTimeout(l),l=window.setTimeout((()=>c(!0)),3e4))}),(()=>(++n<3&&c(!0),!0)))}}},949002:(e,t,i)=>{"use strict";i.d(t,{contextSplit:()=>s});i(751876);function s(e){return isObject(e)&&(e=e.context),(e||"").split(":")}},270605:(e,t,i)=>{"use strict";function s(){}i.d(t,{debugLog:()=>s})},713359:(e,t,i)=>{"use strict";i.d(t,{getContext:()=>o});var s=i(295224),a=i(949002);function o(e){var t,i=window.currentAudioPage&&window.currentAudioPage(e),o=i&&i.getPageCurrentPlaylist(),l=(0,s.getContextPlaylist)(e,!0);return l&&(l=(0,a.contextSplit)(l),Array.isArray(l)&&l.length>0&&(t=l[0])),("search"===t&&o&&o.getSearchQid()||"search"===window.cur.module&&window.cur.qid)&&(t="search:external"),t}},285200:(e,t,i)=>{"use strict";function s(){var e=window.audioLayer;return e||(window.audioLayer=e=new AudioLayer),e}i.d(t,{getLayer:()=>s})},812595:(e,t,i)=>{"use strict";i.d(t,{getPlaylistUrl:()=>a});var s=i(105832);function a(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(0,s.checkIsOfficialPlaylist)(e)?"album":"playlist",l=`/music/${o}/${e}_${t}${i?`_${i}`:""}`;return a?`${location.protocol}//${location.host}${l}`:l}},397807:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>AudioLayer});var _lib_debug_tools__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(787481);class AudioLayer{static prepare(e){stManager.add([jsc("web/audio.js"),"audio.css",jsc("web/suggester.js"),jsc("web/auto_list.js"),jsc("web/indexer.js")],(()=>{e&&e()}))}constructor(){this._els={layerPlace:ge("top_audio_layer_place"),topPlayBtn:geByClass1("_top_audio_player_play"),topNotaBtn:geByClass1("TopNavBtn__audio"),topNotaBtnGroup:ge("top_audio_btn_group")}}toggle(e,t){this._initTooltip();var i=this._els.tooltip,s=void 0!==e?e:!i.isShown();s&&this.initPage(),s?(i.show(),cancelStackPush("top_audio",(()=>{this.toggle(!1,!0)}),!0)):(t||cancelStackPop(),i.hide()),toggleClass(this._els.topNotaBtn,"TopNavBtn--active",s)}hide(){this._els.tooltip.hide()}isShown(){return this._els.tooltip&&this._els.tooltip.isShown()}updatePosition(){return this._els.tooltip&&this._els.tooltip.updatePosition()}_layerPosition(){var e=getXY(this._els.layerPlace),t=getXY("ts_wrap")[0]-e[0]-1,i=0;isVisible(this._els.topNotaBtnGroup)?i=-t+(getXY(this._els.topNotaBtn)[0]-e[0])+15:i=-t+(getXY(this._els.topPlayBtn)[0]-e[0])+3;return{left:t,top:0,arrowPosition:i}}getPageInstance(){return this._page}getTemplate(){return`\n      <div class="audio_layer_container">\n        <div class="top_audio_loading">\n          ${rs(vk.pr_tpl,{id:"",cls:"pr_big"})}\n        </div>\n      </div>\n    `}_initTooltip(){this._els.tooltip||(this._els.container=se(this.getTemplate()),this._els.tooltip=new ElementTooltip(this._els.layerPlace,{id:"audio_layer_tt",content:this._els.container,width:660,offset:[22,5],autoShow:!1,customShow:!0,setPos:this._layerPosition.bind(this),forceSide:"bottom",onHide:()=>{this._page&&this._page.onLayerHide()},onShow:()=>{this._page&&this._page.onLayerShow(this._initSection)}}))}initPage(){this._page||ajax.post("al_audio.php",{act:"layer",is_layer:1,section:window.ap.getCurrentPlaylist()?"current":"all"},{onDone:(html,data,templatesScript)=>{if(this._els.tooltip.isShown()){try{eval(templatesScript)}catch(e){(0,_lib_debug_tools__WEBPACK_IMPORTED_MODULE_0__.logEvalError)(e,templatesScript)}this._els.container.innerHTML=html,this._page=new AudioPage(geByClass1("_audio_page_layout",this._els.container),data),this._initSection="recoms"==data.initSection?data.initSection:void 0,this._page.onLayerShow(this._initSection)}},onFail:()=>!0})}}},482822:(e,t,i)=>{"use strict";i.d(t,{setAudioPlayer:()=>u});i(59357);var s,a=i(200134),o=i(120290),l=i(495283),r=i(479957),d=i(550519),n=i(12733);function u(e){d.HAS_MEDIA_SESSION&&(s&&(s.eventBus.unsubscribe(a.events.PLAY,c),s.eventBus.unsubscribe(a.events.PLAYLIST_CHANGED,_)),(s=e).eventBus.subscribe(a.events.PLAY,c),s.eventBus.subscribe(a.events.PLAYLIST_CHANGED,_))}function _(){s&&!s.getCurrentAudio()&&(0,d.clear)()}function c(){if(d.HAS_MEDIA_SESSION){var e=s.getCurrentPlaylist(),t=s.getCurrentAudio(),i=(0,o.asObject)(t);if(i){var a=(0,l.decodeHTMLEntities)(i.title+(i.subTitle?` (${i.subTitle})`:"")).replace(/<[^>]*>?/gm,""),r=(0,l.decodeHTMLEntities)(i.performer||"").replace(/<[^>]*>?/gm,""),u=(0,l.decodeHTMLEntities)(e&&e.getTitle&&e.getTitle()||"").replace(/<[^>]*>?/gm,""),_=i.coverUrl_p||i.coverUrl_s,c=_?[{sizes:"160x160",src:_}]:[];!function(){if(!d.HAS_MEDIA_SESSION)return;if(s.ads.isPlaying())navigator.mediaSession.setActionHandler("play",h),navigator.mediaSession.setActionHandler("pause",p),navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null);else{navigator.mediaSession.setActionHandler("play",h),navigator.mediaSession.setActionHandler("pause",p);var e=s.getCurrentPlaylist(),t=s.getCurrentAudio();if(e&&e.isLive()?(navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null)):(navigator.mediaSession.setActionHandler("seekbackward",g),navigator.mediaSession.setActionHandler("seekforward",A)),e&&!(0,n.isPodcast)(t)){var i=e.indexOfAudio(t),a=e.getAudioAt(i-1),o=e.getAudioAt(i+1);a?navigator.mediaSession.setActionHandler("previoustrack",y):navigator.mediaSession.setActionHandler("previoustrack",null),o?navigator.mediaSession.setActionHandler("nexttrack",f):navigator.mediaSession.setActionHandler("nexttrack",null)}else navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null)}}(),(0,d.updateMediaSessionMetadata)({title:a,artist:r,album:u,artwork:c})}}}function h(){s.play(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","play")}function p(){s.pause(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","pause")}function g(){var e=(0,o.asObject)(s.getCurrentAudio()),t=s.getCurrentProgress()*e.duration,i=Math.max(0,(t-10)/e.duration);i>0?s.seek(i):s.playPrev(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","seek_backward")}function A(){var e=(0,o.asObject)(s.getCurrentAudio()),t=s.getCurrentProgress()*e.duration,i=Math.min(1,(t+10)/e.duration);i<1?s.seek(i):s.playNext(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","seek_forward")}function y(){s.playPrev(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","previous_track")}function f(){s.playNext(),(0,r.statlogsValueEvent)("global_media_controls","audio_player","next_track")}},913151:(e,t,i)=>{"use strict";i.d(t,{AudioPlayer:()=>U});i(530522),i(66108),i(991181),i(579665),i(95767),i(176774),i(940851),i(296253),i(751876);var s=i(45634),a=i(189158),o=i(185850),l=i(615152),r=i(804333),d=i(222994),n=i(200134),u=i(171171),_=i(471323),c=i(331811),h=i(120290),p=i(522683),g=i(482822),A=i(767356),y=i(782508),f=i(191040),v=i(893301),P=i(729956),m=i(19331),E=i(859866),I=i(273271);function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var i=[],s=!0,a=!1,o=void 0;try{for(var l,r=e[Symbol.iterator]();!(s=(l=r.next()).done)&&(i.push(l.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=e[i];return s}var b={},L=(0,f.throttledPromise)((()=>{}),1500,!0);class U{constructor(){if(this.ensureUrlReject=null,this._currentAudio=!1,this._isPlaying=!1,this._prevPlaylist=null,this._currentPlaylist=null,this._playlists=[],this.subscribers=[],this._statusExport={},this._currentPlayingRows=[],this._podcastsActionRef={},this._podcastsActionLastId={},this._allowPrefetchNext=!0,!vk.isBanned){s.AudioUtils.debugLog("Player creation"),this.eventBus=new c.EventBus;var e=new a.WebPlayerAdapter(this);this.stats=new o.AudioStats(e),this.ads=new d.AudioAds(this,U.getVersion()),this.connectEvents(),(0,y.connectListenQueue)(),this._restoreVolumeState(),this._initImpl(),this._initEvents(),this._podcastCleanStates(),this._listenStatusExport(),setTimeout((()=>{this.restoreState(),s.AudioUtils.toggleAudioHQBodyClass(),this.updateCurrentPlaying()})),(0,g.setAudioPlayer)(this)}}static getVersion(){return 15}static _sendLCNotification(){var e=window.Notifier;e&&e.lcSend("audio_start");try{window.Videoview&&Videoview.togglePlay(!1)}catch(e){}}static showHQLabel(e){var t="_audio_show_hq_label";return void 0===e?!!ls.get(t):(e=!!e,ls.set(t,e),s.AudioUtils.toggleAudioHQBodyClass(),e)}static getAudioElementsByAudioId(e,t){return geByClass(`_audio_row_${e}`,t)}static getDeviceId(){var e=ls.get(U.LS_PREFIX+U.LS_UUID);return e||(e=u(),ls.set(U.LS_PREFIX+U.LS_UUID,e)),e}static showSubscriptionPopup(){showBox("/al_audio.php",{act:"subscription_box"},{params:{containerClass:"audio_subscription_popup",grey:!0,width:520}})}static getDurationType(){return intval(ls.get(U.LS_PREFIX+U.LS_DURATION_TYPE))}static _setTabIcon(e){setFavIcon(U.tabIcons[e])}static _lsGet(e){return ls.get(U.LS_PREFIX+e)}static _lsSet(e,t){return ls.set(U.LS_PREFIX+e,t)}static _podcastGetStates(){return(U._lsGet(U.LS_PODCASTS)||b).states||{}}static _podcastSetStates(e){var t=U._lsGet(U.LS_PODCASTS)||b;t.states=e,U._lsSet(U.LS_PODCASTS,t),b=t}static podcastToggleFave(e,t){if(t){t=s.AudioUtils.asObject(t);var i=s.AudioUtils.getAudioExtra(t).faveHash;i&&bookmarkPodcast(e,t.fullId,i)}}static podcastGetPlaybackRate(){return(U._lsGet(U.LS_PODCASTS)||b).rate||1}static getLang(e){var t=getAudioPlayer();return t&&t.langs?t.langs[e]:e}static clearDeprecatedCacheKeys(){U._iterateCacheKeys((e=>e===U.LS_VER))}static clearOutdatedCacheKeys(){(ls.get(U.LS_PREFIX+U.LS_SAVED)||0)<vkNow()-72e5&&U._iterateCacheKeys(((e,t)=>!inArray(t,[U.LS_PL,U.LS_TRACK,U.LS_PROGRESS])))}getCurrentAudioLs(){return ap.getCurrentAudio()||U._lsGet(U.LS_TRACK)}static clearAllCacheKeys(){U._iterateCacheKeys((()=>!1)),setCookie("remixcurr_audio","",-1)}static _iterateCacheKeys(e){p.vkLocalStorage.getPrefixedKeys(`${U.LS_KEY_PREFIX}_`).forEach((t=>{var i=w(t.split("_"),3),s=i[1],a=i[2];e(s,a)||p.vkLocalStorage.removeItem(a)}))}_initImpl(){this._impl&&this._impl.destroy();var e=0,t=!1,i=t=>{if(-1!==e){if(t&&(e++,this.implTaskManager.delay(200),e>3)){e=-1;var i=new MessageBox({title:getLang("global_error")}).content(getLang("audio_error_loading")).setButtons("Ok",(function(){e=0,curBox().hide()}));return i.show(),(0,r.setWorkerTimeout)((function(){e=0,i.hide()}),3e3),this.notify(n.events.ENDED),void this.notify(n.events.FAILED)}s.AudioUtils.isPodcast(this.getCurrentAudio())?(this.setIsPlaying(!1),this.notify(n.events.PAUSE),this.notify(n.events.ENDED),this.stop()):this._repeatCurrent?(this._autoNext=!0,this.notify(n.events.ENDED),this.notify(n.events.PROGRESS,0),this.implTaskManager.seekImmediate(0),(0,r.setWorkerTimeout)((()=>{this._impl&&this._impl.clearAudioNode&&(this._impl.stop(),this._implSetUrl(this.getCurrentAudio())),this._implPlay()}))):(this.setIsPlaying(!1),this.notify(n.events.ENDED),this.playNext(!0))}},a={onPause:()=>{this.setIsPlaying(!1),this.notify(n.events.PAUSE),t=!1},onPlay:()=>{this.setIsPlaying(!0),this.setVolume(this.getVolume()),this.notify(n.events.PLAY),t=!1},onBufferUpdate:e=>{this.notify(n.events.BUFFERED,e)},onEnd:i,onFail:()=>{this._sendPlayerErrorStats(this._impl),i(!0)},onCanPlay:()=>this.notify(n.events.CAN_PLAY),onProgressUpdate:(e,i)=>{var a=this.getCurrentAudio();if(!this._muteProgressEvents&&a){var o=this._impl.getDuration()||a[s.AudioUtils.AUDIO_ITEM_INDEX_DURATION];this.notify(n.events.PROGRESS,e,o,i),!vk.id&&o-i<U.UNAUTH_FADE_TIME&&!t&&(t=!0,this.fadeOut(1e3*U.UNAUTH_FADE_TIME))}},onFrequency:e=>{this.notify(n.events.FREQ_UPDATE,e)},defaultVolume:this._userVolume};this._impl=new l.AudioPlayerHTML5(a),this.implTaskManager=new A.AudioTaskManager(this._impl),this.implTaskManager.setVolume(0)}fadeIn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;this.implTaskManager.setVolume(this.getVolume(),!0,e)}fadeOut(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;this.implTaskManager.setVolume(0,!0,e)}onMediaKeyPressedEvent(e){if(this.getCurrentAudio())switch(e.keyCode){case 179:this.isPlaying()?this.pause():this.play();break;case 178:this.seek(0),this.pause();break;case 177:this.playPrev();break;case 176:this.playNext()}}setAdsConfig(e){this.ads&&this.ads.setAdsConfig(e)}deletePlaylist(e){for(var t=0;t<this._playlists.length;t++)this._playlists[t]===e&&this._playlists.splice(t,1)}mergePlaylistData(e,t){this._playlists.forEach((i=>{i.getId()===e.getId()&&i.getOwnerId()===e.getOwnerId()&&(i.hasMore()?i.mergeWith(t):i.mergeInfo(t))}))}deleteCurrentPlaylist(){this._currentPlaylist.removeSortedList(),delete this._currentAudio,delete this._currentPlaylist,this.notify(n.events.UPDATE),this.notify(n.events.PLAYLIST_CHANGED),this.stop(),this.updateCurrentPlaying()}updateCurrentPlaying(e){e=!!e;var t=s.AudioUtils.asObject(this.getCurrentAudio()),i=[];if(t){var a=geByClass("_audio_row_"+t.fullId);i=i.concat([].slice.call(a))}for(var o=0,l=this._currentPlayingRows.length;o<l;o++){var r=this._currentPlayingRows[o];r&&!inArray(r,i)&&this.toggleCurrentAudioRow(r,!1,e)}if(t)for(var d=0,n=i.length;d<n;d++){var u=i[d];if(u){if(gpeByClass("article_editor_canvas",u))continue;this.toggleCurrentAudioRow(u,!0,e)}}this._currentPlayingRows=i,each(geByClass("_audio_pl"),((e,t)=>removeClass(t,"audio_pl__playing")));var _=this.getCurrentPlaylist();if(this.isPlaying()&&_){var c=geByClass(`_audio_pl_${_.getOwnerId()}_${_.getPlaylistId()}`);c&&each(c,((e,t)=>addClass(t,"audio_pl__playing")))}}scrollToCurrentPlaying(e,t){var i=U.getAudioElementsByAudioId(e);window.AudioPage&&i.forEach((e=>{var i=window.currentAudioPage(e);if(i&&i._scroll){var s=i.getCurrentSectionEl()||i.getPageContainer();U.getAudioElementsByAudioId(t,s).length||i.drawMore(),i.scrollIntoView(U.getAudioElementsByAudioId(t,s)[0],150)}}))}toggleCurrentAudioRow(e,t,i){var a=s.AudioUtils.getAudioFromEl(e,!0);addClass(e,s.AudioUtils.AUDIO_CURRENT_CLS),a.withInlinePlayer&&toggleClass(e,"audio_row__player_transition",i),(i=!!a.withInlinePlayer&&i)?setTimeout((()=>this._updateAudioEl(t,e,a,i)),0):this._updateAudioEl(t,e,a,i)}_updateAudioEl(e,t,i,a){var o=geByClass1("_audio_row__play_btn",t),l=geByClass1("_audio_row__title",t),r=geByClass1("_audio_row__duration",t),d=s.AudioUtils.getDurationMod(e?i.duration:i.duration*this.getCurrentProgress());e&&t&&!1===this.isPlaying()&&(removeClass(t,"audio_row__playing"),o&&attr(o,"aria-label",getLang("global_audio_play")),l&&attr(l,"role",""));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(r){var i=s.AudioUtils.getDurationMod(e);r.innerHTML=t+formatTime(e),i!==d&&(replaceClass(r,s.AudioUtils.AUDIO_DURATION_CLS+"-"+d,s.AudioUtils.AUDIO_DURATION_CLS+"-"+i),d=i)}};if(i.withInlinePlayer&&(e?this._addRowPlayer(t):this._removeRowPlayer(t)),e){this.on(t,[n.events.PLAY,n.events.PLAY_REQUESTED],(e=>{s.AudioUtils.asObject(e).fullId===i.fullId&&(addClass(t,s.AudioUtils.AUDIO_PLAYING_CLS),o&&attr(o,"aria-label",getLang("global_audio_pause")),l&&attr(l,"role","heading"))})),this.on(t,n.events.PROGRESS,((e,t,s)=>{if(i.withInlinePlayer||!this.ads.isPlaying()){s=intval(s);var a=0,o="";U.getDurationType()?(a=Math.round(s-t*s),o="-"):a=Math.round(t*s),u(a,o)}else u(i.duration)}));var _=data(t,"bars");if(!_&&(i.isWithCovers||i.isNumeric||i.isPodcastListSnippet)){if(_=se('<canvas class="audio_row__sound_bars"></canvas>'),i.isPodcastListSnippet?geByClass1("podcast_list_snippet__cover",t).appendChild(_):t.appendChild(_),_.width=s.AudioUtils.AUDIO_ROW_COVER_SIZE*(isRetina()?2:1),_.height=s.AudioUtils.AUDIO_ROW_COVER_SIZE*(isRetina()?2:1),_.style.width=s.AudioUtils.AUDIO_ROW_COVER_SIZE,_.style.height=s.AudioUtils.AUDIO_ROW_COVER_SIZE,isRetina())_.getContext("2d").scale(2,2);var c=getComputedStyle(_).color;this.on(t,n.events.FREQ_UPDATE,((e,t)=>O(_,t,c))),O(_,[0,0,0,0],c),data(t,"bars",_)}toggleClass(t,s.AudioUtils.AUDIO_PLAYING_CLS,this.isPlaying())}else{this.off(t),removeClass(t,s.AudioUtils.AUDIO_PLAYING_CLS),removeClass(t,s.AudioUtils.AUDIO_CURRENT_CLS),u(i.duration),o&&attr(o,"aria-label",getLang("global_audio_play")),l&&attr(l,"role","");var h=data(t,"bars");h&&(re(h),data(t,"bars",null))}a?setTimeout((()=>{var e=s.AudioUtils.getAudioFromEl(t,!0);toggleClass(t,s.AudioUtils.AUDIO_CURRENT_CLS,!!e.isCurrent)}),0):toggleClass(t,s.AudioUtils.AUDIO_CURRENT_CLS,e)}_removeRowPlayer(e){removeClass(e,s.AudioUtils.AUDIO_CURRENT_CLS);var t=data(e,"player_inited");if(t){setTimeout((()=>re(geByClass1("_audio_inline_player",e))),200);var i=geByClass1("_audio_duration",e);i&&(i.innerHTML=formatTime(s.AudioUtils.getAudioFromEl(e,!0).duration)),this.off(e),each(t.sliders,((e,t)=>t.destroy())),data(e,"player_inited",!1);var a=geByClass1("has_audio_player",e);a&&removeClass(a,"has_audio_player")}}_addRowPlayer(e){if(!(geByClass1("_audio_inline_player",e)||hasClass(e,"podcast_list_snippet")||hasClass(e,"podcast_snippet__controls")||hasClass(e,"PodcastWidget__player"))){var t=se(vk.audioInlinePlayerTpl||getTemplate("audio_inline_player")),i=geByClass1("_audio_player__place",e);i.appendChild(t),addClass(i,"has_audio_player");var a=new Slider(geByClass1("audio_inline_player_volume",t),{value:this.getVolume(),backValue:0,size:1,hintClass:"audio_player_hint",withBackLine:!0,log:!0,formatHint:e=>Math.round(100*e)+"%",onChange:e=>this.setVolume(e)}),o=new Slider(geByClass1("audio_inline_player_progress",t),{value:0,backValue:0,size:1,hintClass:"audio_player_hint",withBackLine:!0,formatHint:e=>formatTime(Math.round(e*this._impl.getDuration())),onEndDragging:e=>{var i=s.AudioUtils.asObject(this.getCurrentAudio());i&&s.AudioUtils.isPodcast(i)&&this.podcastSetActionRef(i,s.AudioUtils.PodcastsLogs.ACTION_SEEK,"",t),this.seek(e)}});this.ads.isPlaying()&&o.toggleAdState(!0),vk.id||o.setBlocked(!0),this.on(e,n.events.AD_DEINITED,(()=>{})),this.on(e,n.events.AD_READY,(()=>{})),this.on(e,n.events.AD_STARTED,(()=>{o.toggleAdState(!0),o.setBackValue(0)})),this.on(e,n.events.AD_COMPLETED,(()=>o.toggleAdState(!1))),this.on(e,n.events.START_LOADING,(()=>o.toggleLoading(!0))),this.on(e,n.events.CAN_PLAY,(()=>o.toggleLoading(!1))),this.on(e,n.events.BUFFERED,((e,t)=>o.setBackValue(t))),this.on(e,n.events.PROGRESS,((e,t)=>{o.toggleLoading(!1),o.setValue(t)})),this.on(e,n.events.VOLUME,((e,t)=>{a.setValue(t,!0)})),data(e,"player_inited",{sliders:[a,o]})}}hasStatusExport(){for(var e in this._statusExport)if(this._statusExport.hasOwnProperty(e)&&this._statusExport[e])return!0;return!1}getStatusExportInfo(){return this._statusExport}setStatusExportInfo(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._statusExport=e,t&&this.setStatusExportInfoStorage(e)}setStatusExportInfoStorage(e){U._lsSet(U.LS_STATUS_EXPORT,e)}deleteAudioFromAllPlaylists(e){e=isObject(e)||isArray(e)?s.AudioUtils.asObject(e).fullId:e,each(this._playlists,((t,i)=>i.removeAudio(e)))}updateAudio(e,t){var i="";return isString(e)?i=e:isArray(e)&&(i=s.AudioUtils.asObject(e).fullId),t||(t=e),each(this._playlists,((e,a)=>{for(var o=a.getAudiosList(),l=function(e,a){`${o[e][s.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]}_${o[e][s.AudioUtils.AUDIO_ITEM_INDEX_ID]}`===i&&(isObject(t)&&each(t,((t,i)=>o[e][t]=i)),isArray(t)&&(o[e]=t))},r=0,d=o.length;r<d;r++)l(r)})),`${this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]}_${this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_ID]}`===i&&(isObject(t)&&each(t,((e,t)=>this._currentAudio[e]=t)),isArray(t)&&(this._currentAudio=t,this.notify(n.events.CURRENT_CHANGED))),this.notify(n.events.UPDATE),e}_triggerTNSPixel(){var e=U._lsGet("tns_triggered_time_v3")||0,t=vkNow();t-e<864e5||(U._lsSet("tns_triggered_time_v3",t),vkImage().src=`https://www.tns-counter.ru/V13a****mail_ru/ru/CP1251/tmsec=mail_audiostart/${irand(1,1e9)}`)}_restoreVolumeState(){U.clearDeprecatedCacheKeys(),U.clearOutdatedCacheKeys();var e=U._lsGet(U.LS_VOLUME);this._userVolume=null==e||!1===e?_.DEFAULT_VOLUME:e}restoreState(){if(!vk.widget&&(U.clearDeprecatedCacheKeys(),U.clearOutdatedCacheKeys(),!window.cur.audioPreventRestoreTrack)){this._currentAudio=U._lsGet(U.LS_TRACK);var e=U._lsGet(U.LS_PL);e&&(e=JSON.parse(e),this._currentPlaylist=new AudioPlaylist(e),this._initPlayingContext(e.context),e.originalPlaylistRawId&&(this._currentPlaylist._originalPlaylistRawId=e.originalPlaylistRawId)),this._currentPlaylist&&this._currentAudio?this.notify(n.events.UPDATE):this._currentPlaylist=this._currentAudio=!1;var t=0;if(s.AudioUtils.isPodcast(this._currentAudio)){var i=U._podcastGetStates(),a=`${this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]}_${this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_ID]}`;t=((i[a]||{}).position||0)/this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_DURATION]}else t=U._lsGet(U.LS_PROGRESS)||0;this._currentAudio&&this._impl&&this._implSetUrl(this._currentAudio,!0).then((()=>{t&&t<1?this.implTaskManager.seek(t):this.implTaskManager.setVolume(0),this.notify(n.events.CURRENT_CHANGED)})).catch((()=>{this.deleteCurrentPlaylist(),this.notify(n.events.CURRENT_CHANGED)})),this._updatePlaybackRate()}}_implPlay(){var e=s.AudioUtils.asObject(this.getCurrentAudio());this.implTaskManager.play().then((()=>{if(this._muteProgressEvents=!1,this._allowPrefetchNext=!browser.safari,e.actionHash&&((0,y.connectListenQueue)(),ajax.post("al_audio.php",{act:"start_playback",audio_id:e.id,owner_id:e.owner_id,hash:e.actionHash,uuid:U.getDeviceId()},{onFail:()=>!0})),s.AudioUtils.isPodcast(e)){var t=this._podcastRestoreState();this._podcastUpdateState(e,t,0,s.AudioUtils.PodcastsLogs.ACTION_PLAY)}}))}_implSetUrl(e,t){this.implTaskManager.clearTask(A.TaskName.URL),t||this.notify(n.events.START_LOADING);var i=(0,h.asObject)(e);return this._ensureHasURL(i).then((e=>{if(e.url)return this.implTaskManager.setUrl(e.url).catch((()=>{this.implTaskManager.clearAllTasks(),this.notify(n.events.FAILED),this.isPlaying()&&(this.pause(),this.playNext(!0,!0))}));throw new Error}))}toggleDurationType(){var e=U.LS_PREFIX+U.LS_DURATION_TYPE,t=intval(ls.get(e));ls.set(e,!t),this.notify(n.events.UPDATE,this.getCurrentProgress())}getCurrentProgress(){return this._impl?this._impl.getCurrentProgress():0}getCurrentBuffered(){return this._impl?this._impl.getCurrentBuffered():0}_initEvents(){var e=window.Notifier;e&&(e.addRecvClbk("audio_start","audio",(()=>{(this.isPlaying()||this.ads.isPlaying())&&(this.pausedByAudio=Date.now(),this.pause()),delete this.pausedByVideo})),e.addRecvClbk("video_start","audio",(()=>{(this.isPlaying()||this.ads.isPlaying())&&(this.pause(),this.pausedByVideo=Date.now())})),e.addRecvClbk("video_hide","audio",(()=>{!this.isPlaying()&&this.pausedByVideo&&(Date.now()-this.pausedByVideo<18e4&&this.play(),delete this.pausedByVideo)})),e.addRecvClbk("logged_off","audio",(()=>{cur.loggingOff=!0,U.clearAllCacheKeys(),this.stop()})),e.addRecvClbk("stories_video_start","audio",(()=>{this.isPlaying()&&(this.pause(),this.pausedByStories=vkNow())})),e.addRecvClbk("stories_video_end","audio",(()=>{!this.isPlaying()&&this.pausedByStories&&(vkNow()-this.pausedByStories<18e4&&this.play(),delete this.pausedByStories)})))}addPlaylist(e){var t=this.hasPlaylist(e.getId());this.hasPlaylist(e.getId())?t.mergeWith(e.asObject()):this._playlists.push(e)}_cleanUpPlaylists(){for(var e=0,t=-1,i=this._playlists.length-1;i>=0;i--){var s=this._playlists[i];if(!s.isReference()&&(e+=s.getAudiosCount())>4e3){t=i;break}}if(-1!==t){t+=1;for(var a=this._playlists.slice(0,t),o=this.getCurrentPlaylist(),l=[],r=0;r<a.length;r++){var d=a[r];if(o===d&&(d=!1),d&&!d.isReference())for(var n=t;n<this._playlists.length;n++){var u=this._playlists[n];u.isReference()&&u.getSelf()===d&&(d=!1)}d&&l.push(r)}for(var _=0;_<l.length;_++){var c=l[_];this._playlists.splice(c,1)}l.length&&debugLog("AudioPlayer - "+l.length+" playlists removed")}}hasPlaylist(e,t,i,s){var a;if(s)return this._playlists.find((e=>e.getBlockId()===s||e.getAlbumId()===s))||!1;a=void 0!==t&&void 0!==i?`${e}_${t}_${i}`:e;for(var o=0;o<this._playlists.length;o++){var l=this._playlists[o];if(!l.isReference()&&l.getId()===a)return l}return!1}getPlaylistByBlockId(e){return this.hasPlaylist(null,null,null,e)||null}getPlaylistsByType(e){return this._playlists.filter((t=>t.getType()===e))||null}getPlaylist(e,t,i,s){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e&&!t&&!i){var o=w(AudioPlaylist.splitId(e),3);e=o[0],t=o[1],i=o[2]}var l=this.hasPlaylist(e,t,i,a);return l?(l.mergeWith({accessHash:s}),l):new AudioPlaylist({type:e,ownerId:t,albumId:i,hasMore:e!==AudioPlaylist.TYPE_TEMP,accessHash:s,blockId:a})}isFromNextSequence(){return 1===this._seq}isFromPrevSequence(){return-1===this._seq}isAutoPlayed(){return!!this._autoNext}hasPrevAudio(){return!(!this._prevAudio||s.AudioUtils.getAudioFullId(this._currentAudio)===s.AudioUtils.getAudioFullId(this._prevAudio))}hasPrevPlaylist(){return!!this._prevPlaylist}toggleRepeatCurrentAudio(){this._repeatCurrent=!this._repeatCurrent,this._repeatAll=!1}isRepeatCurrentAudio(){return!!this._repeatCurrent}toggleRepeatAll(){this._repeatAll=!this._repeatAll,this._repeatCurrent=!1}isRepeatAll(){return!!this._repeatAll}setNext(e,t){if(vk&&vk.widget&&!vk.id&&window.Widgets)return Widgets.oauth(),!1;var i="audio_row__added_next";if(!hasClass(e,i)){addClass(e,i);var a=this.getCurrentPlaylist();if(a){var o=s.AudioUtils.asObject(this.getCurrentAudio());if(o&&t.fullId===o.fullId)return;var l=a.indexOfAudio(o);if(-1===l)return;this.notify(n.events.PLAY_NEXT,o.fullId,t.fullId);var r=a.indexOfAudio(t);-1!==r?a.moveAudio(r,l+1):a.addAudio((0,v.serializeAudio)(t),l+1)}else{var d=s.AudioUtils.getContextPlaylist(e);this.play(t,d.playlist,d.context)}var u=window.AudioPage&&currentAudioPage(e);if(u){var _=u.getPageCurrentPlaylist();_&&u.onUserAction(t,_)}}}on(e,t,i){isArray(t)||(t=[t]),each(t,((t,s)=>this.subscribers.push({context:e,et:s,cb:i})))}off(e){this.subscribers=this.subscribers.filter((t=>t.context!==e))}connectEvents(){var e=this;this.eventBus.precheck=e=>!!this._impl&&!(!this.ads.isPlaying()&&this._muteProgressEvents&&inArray(e,[n.events.BUFFERED,n.events.PROGRESS])),this.eventBus.onAnyCallBack=function(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return e.onEvent(t,...s)},this.subscribe(n.events.VOLUME,(()=>U._lsSet(U.LS_VOLUME,this._userVolume))),this.subscribe(n.events.PLAY_REQUESTED,(()=>{this.updateCurrentPlaying(!0),this.saveStateCurrentPlaylist(),this._saveStateCurrentAudio(),U._setTabIcon("play"),this._sendStatusExport()})),this.subscribe(n.events.PLAY,(()=>this.updateCurrentPlaying(!0))),this.subscribe(n.events.PLAYLIST_CHANGED,(()=>{this.saveStateCurrentPlaylist(),this._saveStateCurrentAudio()})),this.subscribe(n.events.PROGRESS,((e,t,i)=>{var a=this.getCurrentAudio(),o=(0,h.asObject)(a);if(this._listenedTime=i,s.AudioUtils.isPodcast(o))e&&i&&this._podcastUpdateState(o,e,i,s.AudioUtils.PodcastsLogs.ACTION_HEARTBEAT);else if(!this.ads.isPlaying()){var l=this.getCurrentPlaylist(),r=this._impl.getCurrentProgress();if(vk.widget||U._lsSet(U.LS_PROGRESS,r),!vk.widget&&this._allowPrefetchNext&&r>=.8){var d=l.getNextAudio(a);d&&this._impl.isFullyLoaded()&&(this._allowPrefetchNext=!1,this._prefetchAudio(d))}}})),this.subscribe(n.events.PAUSE,(()=>{this.updateCurrentPlaying(!0);var e=this.getCurrentAudio(),t=(0,h.asObject)(e);s.AudioUtils.isPodcast(t)&&this._podcastUpdateState(t,this.getCurrentProgress(),this._impl.getPlayedTime(),s.AudioUtils.PodcastsLogs.ACTION_PAUSE),U._setTabIcon("pause")})),this.subscribe(n.events.SEEK,(()=>{var e=this.getCurrentAudio(),t=(0,h.asObject)(e);s.AudioUtils.isPodcast(t)&&this._podcastUpdateState(t,this.getCurrentProgress(),this._impl.getPlayedTime(),s.AudioUtils.PodcastsLogs.ACTION_SEEK)})),this.subscribe(n.events.ENDED,(()=>{var e=this.getCurrentAudio(),t=(0,h.asObject)(e);s.AudioUtils.isPodcast(t)&&this._podcastUpdateState(t,this.getCurrentProgress(),this._impl.getPlayedTime(),s.AudioUtils.PodcastsLogs.ACTION_HEARTBEAT),window.vk&&!window.vk.widget&&!window.vk.id&&(0,m.partConfigEnabled)("audio_unauth_preview_box")&&(this.stop(),I.Unauthorized.showMoreBox(null,0,E.UnauthorizedSourceType.AUDIO))}))}subscribe(e,t){this.eventBus.subscribe(e,t)}unsubscribe(e,t){this.eventBus.unsubscribe(e,t)}onEvent(e,t,i,s){inArray(e,[n.events.PLAY,n.events.PLAY_REQUESTED,n.events.PAUSE])&&(this.subscribers=this.subscribers.filter((e=>!(e.context instanceof Element)||bodyNode.contains(e.context)))),each(this.subscribers||[],((a,o)=>{o.et===e&&o.cb(this.getCurrentAudio(),t,i,s)}))}notify(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.eventBus.emit(e,...i)}addWithReplacePlaylists(e){var t=e.reduce(((e,t)=>(e[t.getFullId()]=t,e)),{}),i={};this._playlists.forEach(((e,s)=>{var a=e.getFullId();t[a]&&(this._playlists[s]=t[a],i[a]=!0)})),t.forEach((e=>{i[e.getFullId()]||this._playlists.push(e)}))}_sendPlayerErrorStats(e){var t=s.AudioUtils.asObject(this.getCurrentAudio());if(t){var i=t.full_id,a=extend({audio:i,progress:this.getCurrentProgress(),buffered:this.getCurrentBuffered()},e.getErrorData());ajax.post("al_audio.php?act=player_error_stats",a)}}playLive(e,t){var i=this.getPlaylist(AudioPlaylist.TYPE_LIVE,vk.id,data[0]);i.mergeWith({live:e,hasMore:!1}),e=i.getLiveInfo(),ajax.post("al_audio.php",{act:"a_play_audio_status",audio_id:e.audioId,host_id:e.hostId,hash:e.hash},extend(t,{onDone:(e,t,s)=>{i.mergeWith({title:t&&t.title,list:[e]}),this.play(e,i,s)},onFail:()=>!0}))}_listenStatusExport(){window.addEventListener("storage",(e=>{if(e.key===U.LS_PREFIX+U.LS_STATUS_EXPORT){var t=U._lsGet(U.LS_STATUS_EXPORT);this.setStatusExportInfo(t),cur.audioPage&&cur.audioPage.updateStatusExportControls()}}))}_sendStatusExport(){var e=s.AudioUtils.asObject(this.getCurrentAudio());if(e){var t=this.statusSent?this.statusSent.split(","):[!1,0],i=vkNow()-intval(t[1]);if(this.hasStatusExport()&&!s.AudioUtils.isPodcast(e)&&(e.id!=t[0]||i>3e5)){var a=this.getCurrentPlaylist(),o=a?a.playbackParams:null;setTimeout(ajax.post.pbind("al_audio.php",{act:"audio_status",full_id:e.fullId,hash:vk.statusExportHash,top:intval(o&&(o.top_audio||o.top))},{onFail:()=>!0}),0),this.statusSent=e.id+","+vkNow()}}}saveStateCurrentPlaylist(){if(!vk.widget){var e=this.getCurrentPlaylist(),t=e?e.serialize():null;U._lsSet(U.LS_PL,t),U._lsSet(U.LS_SAVED,vkNow())}}_saveStateCurrentAudio(){if(!vk.widget){var e=this.getCurrentAudio();if(e){var t=clone(e);t[s.AudioUtils.AUDIO_ITEM_INDEX_URL]="",U._lsSet(U.LS_TRACK,t),setCookie("remixcurr_audio",`${e[s.AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]}_${e[s.AudioUtils.AUDIO_ITEM_INDEX_ID]}`,1)}else U._lsSet(U.LS_TRACK,null),setCookie("remixcurr_audio",null,1)}}getListenedTime(){return this._listenedTime}seekCurrentAudio(e,t){if(this.ads.isPlaying())return!1;var i=(t=t||10)/s.AudioUtils.asObject(this.getCurrentAudio()).duration,a=this.getCurrentProgress()+(e?i:-i);a=Math.max(0,Math.min(1,a)),this.seek(a)}setVolume(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Math.min(1,Math.max(0,e));this._userVolume!==i&&(this._userVolume=i,this.notify(n.events.VOLUME,i)),this.implTaskManager.setVolume(i,t),this.ads.updateVolume()}getVolume(){return void 0===this._userVolume?.8:this._userVolume}seek(e){this.implTaskManager.seek(e),this.notify(n.events.SEEK)}seekToTime(e,t){var i=this.getCurrentAudio();if(!i)return 0;var a=e/i[s.AudioUtils.AUDIO_ITEM_INDEX_DURATION];if(a=Math.max(0,a),a=Math.min(a,1),this.seek(a),s.AudioUtils.isPodcast(i)){var o="",l=s.AudioUtils.asObject(i);t&&(o=s.AudioUtils.PodcastsLogs.ACTION_TIME_MARKER,this.podcastSetActionRef(l,s.AudioUtils.PodcastsLogs.ACTION_SEEK,t)),this._podcastUpdateState(l,a,0,o)}return a}_ensureHasURL(e){this._currentUrlEnsure=this._currentUrlEnsure||{};var t,i=[];if(!e)return Promise.reject();if(e.url)return Promise.resolve(e);if(!this._currentUrlEnsure[e.fullId]){var a=this.getCurrentPlaylist(),o=a.indexOfAudio(e);if(o>=0)for(var l=o;l<o+5;l++){var r=s.AudioUtils.asObject(a.getAudioAt(l));!r||r.url||this._currentUrlEnsure[r.fullId]||!r.urlHash&&!r.isFromQueue||(i.push(r.fullId+"_"+r.actionHash+"_"+r.urlHash),this._currentUrlEnsure[r.fullId]=!0)}}return!i.length&&this.currentEnsureUrlPromise?t=this.currentEnsureUrlPromise:(t=new Promise(((e,t)=>{this.ensureUrlReject&&this.ensureUrlReject(),this.ensureUrlReject=t,L().then((()=>this.fetchAudioUrls(i))).then((t=>{this.ensureUrlReject=null,e(t)})).catch((s=>{switch(s){case"bad_hash":this.ensureUrlReject=null,this.fetchAudios(i).then((e=>this.fetchAudioUrls(e))).then(e).catch((()=>!0));break;case"no_audios":this.ensureUrlReject=null,t()}return!0}))})),this.currentEnsureUrlPromise=t),t.then((t=>(Array.isArray(t)&&t.forEach((t=>{if(e.fullId===(0,P.getAudioFullId)(t)){var i=(0,h.asObject)(t);e.url=i.url,e.ads=i.ads,e.flags=i.flags,e.extra=i.extra}})),e)))}fetchAudioUrls(e){return new Promise(((t,i)=>{ajax.post("al_audio.php?act=reload_audio",{ids:e.join(",")},{onDone:(e,i,a,o)=>{this.setStatusExportInfo(i),this._listenedHash=a,o&&this._podcastSaveData(o),each(e,((e,t)=>{t=s.AudioUtils.asObject(t);var i={};i[s.AudioUtils.AUDIO_ITEM_INDEX_URL]=t.url,i[s.AudioUtils.AUDIO_ITEM_INDEX_ADS]=t.ads,i[s.AudioUtils.AUDIO_ITEM_INDEX_FLAGS]=t.flags,i[s.AudioUtils.AUDIO_ITEM_INDEX_EXTRA]=t.extra,this.updateAudio(t.fullId,i),this._currentAudio&&(0,P.getAudioFullId)(this._currentAudio)===t.fullId&&(this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_URL]=t.url,this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_ADS]=t.ads,this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_FLAGS]=t.flags,this._currentAudio[s.AudioUtils.AUDIO_ITEM_INDEX_EXTRA]=t.extra),delete this._currentUrlEnsure[t.fullId]})),t(e)},onFail:e=>(i(e),!0)})}))}fetchAudios(e){return new Promise(((t,i)=>{ajax.post("al_audio.php?act=reload_audios",{audio_ids:e.join(",")},{onDone:e=>{var s=[],a=this.getCurrentPlaylist().getAudiosList();if(Array.isArray(e)){for(var o=e.reduce(((e,t)=>(e[(0,P.getAudioFullId)(t)]=t,e)),{}),l=0;l<a.length;l++){var r=(0,P.getAudioFullId)(a[l]);if(o[r]){a[l]=o[r];var d=(0,h.asObject)(o[r]);s.push(`${d.fullId}_${d.actionHash}_${d.urlHash}`)}}t(s)}else i()}})}))}toggleAudio(e,t){if(vk&&vk.widget&&window.Widgets&&!vk.widgetPodcast&&!vk.id&&!(0,m.partConfigEnabled)("audio_unauth_preview"))return Widgets.oauth(),!1;if(domClosest("_audio_row__tt",t.target))return cancelEvent(t);var i=domClosest("_audio_row",e),a=s.AudioUtils.getAudioFromEl(i,!0);if(window.getSelection&&window.getSelection().rangeCount){var o=window.getSelection().getRangeAt(0);if(o){var l=o.commonAncestorContainer;if(l&&domClosest("_audio_row",l)===i&&o.startOffset!==o.endOffset)return!1}}if(t&&hasClass(t.target,"mem_link"))return nav.go(attr(t.target,"href"),t,{navigateToUploader:!0}),cancelEvent(t);if(hasClass(t.target,"_audio_row__title_inner")){if(s.AudioUtils.isPodcast(a))return showPodcast(i,a.fullId),cancelEvent(t);if(a.lyrics&&!a.isInAttach)return s.AudioUtils.toggleAudioLyrics(i,a),cancelEvent(t);if(a.hasTrackPage&&!a.isClaimed)return;cancelEvent(t)}if(hasClass(t.target.parentNode,"audio_row__performers")){if(checkEvent(t)||vk.widget)return!0;if(!gpeByClass("_ape_audio_item",t.target)){var r=domData(t.target,"performer");if(r)return s.AudioUtils.audioSearchPerformer(t.target,r,t),cancelEvent(t)}return!0}var d=cur.cancelClick||t&&(hasClass(t.target,"audio_lyrics")||domClosest("_audio_duration_wrap",t.target)||domClosest("_audio_inline_player",t.target)||domClosest("audio_performer",t.target)),n=hasClass(t.target,"slider")||domClosest("slider",t.target),u=cur._sliderMouseUpNowEl&&(cur._sliderMouseUpNowEl===geByClass1("audio_inline_player_progress",i)||cur._sliderMouseUpNowEl===geByClass1("audio_inline_player_volume",i));if((n||u)&&(d=!0),delete cur.cancelClick,delete cur._sliderMouseUpNowEl,d)return!0;if(s.AudioUtils.isClaimedAudio(a)||a.isReplaceable){var _=s.AudioUtils.getAudioExtra(a).claim;if(_)return void(hasClass(i,"no_actions")||a.isInEditBox||showAudioClaimWarning(a,_,s.AudioUtils.replaceWithOriginal.bind(s.AudioUtils,i,a)))}if(this.podcastSetActionRef(a,a.isPlaying?s.AudioUtils.PodcastsLogs.ACTION_PAUSE:s.AudioUtils.PodcastsLogs.ACTION_PLAY,"",i),a.isPlaying)this.pause();else{var c=s.AudioUtils.getContextPlaylist(i);this.play(a.fullId,c.playlist,a.context||c.context),cur.audioPage&&cur.audioPage.onUserAction(a,c.playlist)}s.AudioUtils.onRowOver(i,!1,!0)}playNextPlaylist(e,t,i){var s=this.getPlaylist(AudioPlaylist.TYPE_PLAYLIST,e,t,i);s.loadAll((()=>{var e=this.getCurrentPlaylist();if(e)e.addAudio(s.getAudiosList());else{this._currentPlaylist=new AudioPlaylist(s);var t=s.getAudioAt(0);t&&(this._currentAudio=t,this.notify(n.events.UPDATE),this.notify(n.events.PLAYLIST_CHANGED),this.updateCurrentPlaying(),this.isPlaying()||this.play(t.fullId,s))}})),boxQueue&&boxQueue.hideAll(),layers&&layers.fullhide&&layers.fullhide()}playPlaylist(e,t,i,s,a){if(vk&&vk.widget&&!vk.id&&window.Widgets&&!(0,m.partConfigEnabled)("audio_unauth_preview"))return Widgets.oauth(),!1;this.playNextInPlaylist(e,t,i,s,{shuffled:a,preDoPlay:e=>{a&&(e.isShuffled()&&e.shuffle(0),e.shuffle(irand(1,999999),!0))}})}playBlock(e,t,i,s,a){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"default";this.playNextInPlaylist(e,t,i,s,{type:a,trackType:o,shuffled:!1})}playNextInPlaylist(e,t,i,s){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=this.getCurrentPlaylist(),l=this.getPlaylist(a.type||AudioPlaylist.TYPE_PLAYLIST,e,t,i);if(l.setContext(s),o&&o.getId()===l.getId()&&this.isPlaying()&&!a.shuffled)this.pause();else{var r=!1,d=()=>{if(!r){r=!0,a.preDoPlay&&a.preDoPlay(l);var e=l.getNextAudio(!1,!0);e&&this.play(e,l,s)}};if(l.getAudiosCount()&&!a.shuffled&&!l.isExpired())return void d();this._impl&&this._impl.preparePlay&&!this.ads.isPlaying()&&this._impl.preparePlay(),l.load(0,d,null,a.trackType)}}_initPlayingContext(e){this._playingContext=e}getListenedHash(){return this._listenedHash||""}_getPlayingContext(){return this._playingContext||""}_getPlayingContextSection(){return this._getPlayingContext().split(":")[0]}play(e,t,i,a,o){if(!cur.loggingOff&&this._impl){this._seq=a,this._autoNext=o,this._prevAudio=this._currentAudio,(isObject(e)||isArray(e))&&(e=s.AudioUtils.asObject(e))&&(e=e.fullId);var l=s.AudioUtils.asObject(this._currentAudio),r=this.getCurrentPlaylist();!e&&l&&(e=l.fullId);var d=!1,u=e&&l&&e==l.fullId;t?r&&(d=u?t.getFullId()===r.getSelf().getFullId():t===r.getSelf()||t===r):(t=r,d=!0),d||i||debugLog("New playlist play init without context"),i&&(this._prevContext=this._playingContext,this._initPlayingContext(i));var c=t.getAudio(e);u||(c&&t.load(t.indexOfAudio(c)+3),t.getType()===AudioPlaylist.TYPE_SEARCH&&t.indexOfAudio(c)>=t.getLocalFoundCount()&&t.sendSearchStats("search_play"),l&&s.AudioUtils.isPodcast(l)&&this.isPlaying()&&this._podcastUpdateState(l,this.getCurrentProgress(),this._impl.getPlayedTime(),s.AudioUtils.PodcastsLogs.ACTION_PAUSE,{needResetListen:!0}),this.ads.isPlaying()||this.ads.deinit()),d||(this._cleanUpPlaylists(),this._currentPlaylist&&(this._prevPlaylist=this._currentPlaylist,this._prevAudio=this._currentAudio),this._currentPlaylist=new AudioPlaylist(t),this.notify(n.events.PLAYLIST_CHANGED)),U._sendLCNotification(),u?this.ads.isPlaying()?this.ads.resume():this.isPlaying()||(this.setIsPlaying(!0),this.implTaskManager.clearAllTasks(),this._implSetUrl(l).then((()=>{this._implPlay(),this._updatePlaybackRate(),this.implTaskManager.setVolume(this.getVolume(),!!this._impl.getCurrentProgress()),s.AudioUtils.isPodcast(c)&&this._podcastUpdateState(s.AudioUtils.asObject(c),this.getCurrentProgress(),this._impl.getPlayedTime())})).catch((()=>{}))):e&&c&&(!o&&l&&this._impl.setUrl(_.SILENCE),this._currentAudio=c,this.setIsPlaying(!0),this.ads.isPlaying()?this.ads.resume():(this.notify(n.events.PLAY_REQUESTED,!0,intval(a),o),this._muteProgressEvents=!0,this.implTaskManager.clearAllTasks(),this._impl.preparePlay&&this._impl.preparePlay(),this.ads.startPlay(s.AudioUtils.asObject(c),(()=>this.playAfterAd())),this.notify(n.events.PROGRESS,0)),this.updateCurrentPlaying(!0),l&&this.scrollToCurrentPlaying(l.fullId,e))}}playAfterAd(){this.notify(n.events.CURRENT_CHANGED);var e=this.getCurrentAudio();e&&(this.notify(n.events.UPDATE),this._implSetUrl(e).then((()=>{this._implPlay(),this._updatePlaybackRate(),vk.id?this.implTaskManager.setVolume(this.getVolume()):this.fadeIn(1e3*U.UNAUTH_FADE_TIME),this._triggerTNSPixel()})).catch((()=>(this.pause(),!0))))}instantPlay(e,t,i){var s=!browser.safari&&t&&t.shiftKey;this.playPlaylist(vk.id,AudioPlaylist.DEFAULT_PLAYLIST_ID,i,"header",s),statlogsValueEvent("client_header_play_button",s?"shuffle":"play"),setTimeout((()=>{addClass(e,"loading")}),400)}_prefetchAudio(e){(e=s.AudioUtils.asObject(e))&&e.url&&this._impl.prefetch(e.url)}getCurrentPlaylist(){return this._currentPlaylist}getPlaylists(){return clone(this._playlists)}pause(){this.ads.isPlaying()&&setTimeout((()=>this.ads.pause()),100),this.implTaskManager.setVolume(0,!0),this.implTaskManager.pause()}stop(){this.setIsPlaying(!1),this.ads.isPlaying()?this.ads.stop():this._impl.stop(),this.notify(n.events.STOP)}isPlaying(){return this._isPlaying}setIsPlaying(e){this._isPlaying=e}getCurrentAudio(){return this._currentAudio}playNext(e){this._playNext(1,e)}playPrev(){this._playNext(-1)}_playNext(e,t){if(!this.ads.isPlaying()){var i=10,a=this.getCurrentAudio(),o=this.getCurrentPlaylist(),l=(e,i)=>{s.AudioUtils.isClaimedAudio(e)||this.play(e,o,!1,i,t)};if(a&&o)if(e>0){for(var r=o.getNextAudio(a);i&&r&&s.AudioUtils.isClaimedAudio(r);)r=o.getNextAudio(r),i--;if(r)l(r,1);else if(o.isLive())this._muteProgressEvents=!0,o.fetchNextLiveAudio((e=>l(e,1)));else{if(r=o.getAudioAt(0),s.AudioUtils.isClaimedAudio(r))for(var d=o.getAudiosList(),u=o.getAudiosCount(),_=0;_<u;_++){var c=d[_];if(!s.AudioUtils.isClaimedAudio(c)){r=c;break}}if(!this.isRepeatAll())if(o.indexOfAudio(a)+1===o.getAudiosCount())return this.implTaskManager.seekImmediate(0),this.stop(),void(s.AudioUtils.isClaimedAudio(r)||(this._currentAudio=r,this._implSetUrl(this._currentAudio),this.updateCurrentPlaying(!0),this.notify(n.events.CURRENT_CHANGED),this.notify(n.events.UPDATE)));l(r,1)}}else{var h=o.indexOfAudio(this._currentAudio)-1;if(h<0||this._impl.getCurrentTime()>5)this.seek(0);else{for(var p=o.getAudioAt(h);i&&p&&s.AudioUtils.isClaimedAudio(p);)p=o.getAudioAt(--h),i--;p?l(p,-1):this.seek(0)}}}}adsGetCurrentProgress(){return this.ads.getCurrentProgress()}_podcastUpdateState(e,t,i,s,a){var o=U._podcastGetStates(),l=Math.round(e.duration*t);o[e.fullId]={t:vkNow(),position:l},U._podcastSetStates(o),s&&this._podcastSendLogs(s,e,i,l,a)}_podcastSendLogs(e,t,i,a,o){if(t&&e&&s.AudioUtils.isPodcast(t)&&(!cur._podcastsActionId||!cur._podcastsActionId[e]||this._podcastsActionLastId[e]!==cur._podcastsActionId[e])){var l=this._podcastsActionRef[t.fullId]||{},r=l[e]||{};s.AudioUtils.PodcastsLogs.log(e,extend({audio:t,position:a,listen:i},r,o||{})),delete l[e],this._podcastsActionLastId[e]=cur._podcastsActionId?cur._podcastsActionId[e]:null}}podcastSetActionRef(e,t,i,a){e=s.AudioUtils.asObject(e),t&&s.AudioUtils.isPodcast(e)&&(this._podcastsActionRef[e.fullId]=this._podcastsActionRef[e.fullId]||{},this._podcastsActionRef[e.fullId][t]={ref:i,refEl:a},cur._podcastsActionId=cur._podcastsActionId||{},cur._podcastsActionId[t]=irand(0,1e6))}_podcastCleanStates(){var e=U._podcastGetStates(),t=!1;return each(e,((i,s)=>{Date.now()-s.t>2419200&&(delete e[i],t=!0)})),t&&U._podcastSetStates(e),e}_podcastSaveData(e){var t=U._podcastGetStates();each(e,((e,i)=>{var s=i.state;if(s){var a=+s[1];(!t[e]||!t[e][1]||a&&a>t[e][1])&&(t[e]={position:+s[0],t:Date.now()})}})),U._podcastSetStates(t)}_podcastRestoreState(){var e=s.AudioUtils.asObject(this.getCurrentAudio());if(!s.AudioUtils.isPodcast(e))return 0;var t=0;cur.podcastSeekToTime?(t=this.seekToTime(cur.podcastSeekToTime,cur.podcastSeekToTimeRef),delete cur.podcastSeekToTime,delete cur.podcastSeekToTimeRef):(t=((U._podcastGetStates()[e.fullId]||{}).position||0)/e.duration)&&t<1&&this.implTaskManager.seek(t);return t&&t<1?(this.updateCurrentPlaying(),t):0}getCurrentFaveStatus(){return!!s.AudioUtils.isPodcast(this._currentAudio)&&s.AudioUtils.getAudioExtra(this._currentAudio).fave}_updatePlaybackRate(){var e=s.AudioUtils.isPodcast(this._currentAudio)||s.AudioUtils.isArticleTts(this._currentAudio),t=!this.ads.isPlaying()&&e?U.podcastGetPlaybackRate():1;this.implTaskManager.updatePlaybackRate(t)}podcastChangePlaybackRate(e){var t=U._lsGet(U.LS_PODCASTS)||b,i=t.rate||1;e?i-=U.PLAYBACK_RATE_STEP:i+=U.PLAYBACK_RATE_STEP,!e&&i>U.PLAYBACK_RATE_MAX?i=1:e&&i<1&&(i=U.PLAYBACK_RATE_MAX),t.rate=i,U._lsSet(U.LS_PODCASTS,t),b=t,this._updatePlaybackRate()}playAudio(e){var t=new AudioPlaylist(AudioPlaylist.TYPE_TEMP);t.mergeWith({list:[e]}),this.play(e,t)}}U.UNAUTH_FADE_TIME=.8,U.LS_VER="v20",U.LS_KEY_PREFIX="audio",U.LS_PREFIX=U.LS_KEY_PREFIX+"_"+U.LS_VER+"_",U.LS_STATUS_EXPORT=U.LS_KEY_PREFIX+"_status_export",U.LS_VOLUME="vol",U.LS_PL="pl",U.LS_TRACK="track",U.LS_SAVED="saved",U.LS_PROGRESS="progress",U.LS_PODCASTS="podcasts",U.LS_DURATION_TYPE="dur_type",U.LS_UUID="uuid",U.LS_ADS_CURRENT_DELAY="ads_current_delay_v4",U.PLAYBACK_RATE_STEP=.5,U.PLAYBACK_RATE_MAX=3;var T=window.devicePixelRatio>=2?"_2x":"";function O(e,t,i){var s=e.getContext("2d");s.clearRect(0,0,e.width,e.height),s.fillStyle=i;for(var a=0;a<4;a++){var o=2+12*t[a];s.fillRect(13+4*a,12-o+14,2,o)}}U.tabIcons={def:`/images/icons/favicons/fav_logo${T}.ico`,play:`/images/icons/favicons/fav_play${T}.ico`,pause:`/images/icons/favicons/fav_pause${T}.ico`}},848001:(e,t,i)=>{"use strict";i.d(t,{init:()=>d});var s=i(397807),a=i(45634),o=i(461292),l=i(67766),r=i(913151);function d(){window.AudioLayer=s.default,window.AudioUtils=a.AudioUtils,window.TopAudioPlayer=o.TopAudioPlayer,window.AudioPlaylist=l.AudioPlaylist,window.AudioPlayer=r.AudioPlayer}},285132:(e,t,i)=>{"use strict";i.d(t,{followOwner:()=>o});var s=i(200134),a=i(850167);function o(e,t){window.ajax.post("/al_audio.php?act=follow_owner",{owner_id:e,hash:t},{onDone:function(){(0,a.getAudioPlayer)().notify(s.events.MUSIC_OWNERS_FOLLOW)}})}},291976:(e,t,i)=>{"use strict";i.d(t,{unfollowOwner:()=>o});var s=i(200134),a=i(850167);function o(e,t){window.ajax.post("/al_audio.php?act=unfollow_owner",{owner_id:e,hash:t},{onDone:function(){(0,a.getAudioPlayer)().notify(s.events.MUSIC_OWNERS_UNFOLLOW)}})}},511867:(e,t,i)=>{"use strict";i.d(t,{WebQueueListener:()=>a});var s=i(570655),a=function(e){function t(t){return e.call(this,t)||this}return(0,s.__extends)(t,e),t.prototype.connect=function(e){var t=this;e&&this.listenQueueKey!==e.key&&(this.connected=!0,this.listenQueueKey=e.key,window.Notifier.addKey({key:e.key,ts:e.timestamp},(function(e,i){return t.queueHandler(i)})))},t}(i(772703).QueueListener)}}]);try{stManager.done("dist/audioplayer.198efba98031d5b51267.js")}catch(e){}